mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-10-04 19:42:01 +08:00
Persist Implementation
This commit is contained in:
1 parent
424d182d60
commit
d0ff9153d2
2 files changed
+93
-2
No files matched your search
@@ -132,7 +132,7 @@ public final class Db {
|
||||
stmt.close();
|
||||
}
|
||||
|
||||
public static List<Identity> getAllIdentityFromStorage(String name) throws Exception {
|
||||
public static List<Identity> getAllIdentityFromStorage() throws Exception {
|
||||
Connection c = Sqlite.getInstance().getConn();
|
||||
Statement stmt = c.createStatement();
|
||||
ResultSet rs = stmt.executeQuery("SELECT * from identityinfo");
|
||||
@@ -243,7 +243,7 @@ public final class Db {
|
||||
c.close();
|
||||
}
|
||||
|
||||
public Identity getDefaultIdentityFromStorage() throws Exception{
|
||||
public static Identity getDefaultIdentityFromStorage() throws Exception{
|
||||
Connection c = Sqlite.getInstance().getConn();
|
||||
PreparedStatement pstmt = c.prepareStatement("SELECT * from identityinfo where is_default= ? LIMIT 1");
|
||||
pstmt.setInt(1, 1);
|
||||
|
||||
Reference in new issue
Block a user