Package io.odysz.semantic.DA.drvmnger
Class SqliteDriver2
- Direct Known Subclasses:
SqliteDriverQueued
All instance using the same connection.
Sqlite connection.
SqliteDriver using sigle connection to avoid error:
see StackOverflow: Getting [SQLITE_BUSY] database file is locked with select statements
Sqlite connection.
SqliteDriver using sigle connection to avoid error:
see StackOverflow: Getting [SQLITE_BUSY] database file is locked with select statements
- Author:
- odys-z@github.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConnectionSqlite connection.
SqliteDriver using sigle connection to avoid error:
org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
see StackOverflow: Getting [SQLITE_BUSY] database file is locked with select statementsFields inherited from class io.odysz.semantic.DA.AbsConnect
drvName, enableSystemout, flag_disableSql, flag_nothing, flag_printSql, id, locks, log -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclose()int[]int[]Commit statementMUST CLOSE CONNECTION!static SqliteDriver2initConnection(String id, String jdbc, String user, String psword, boolean log, int flags) GetSqliteDriver2instance, with database connection got viaDriverManager.Methods inherited from class io.odysz.semantic.DA.AbsConnect
commit, driverType, getAutoseqLock, initDmConnect, initPooledConnect, printSql, printSql, prop, prop
-
Field Details
-
conn
Sqlite connection.
SqliteDriver using sigle connection to avoid error:
org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
see StackOverflow: Getting [SQLITE_BUSY] database file is locked with select statements
-
-
Method Details
-
close
- Overrides:
closein classAbsConnect<SqliteDriver2>- Throws:
SQLException
-
getConnection
MUST CLOSE CONNECTION!- Returns:
- connection
- Throws:
SQLException
-
initConnection
public static SqliteDriver2 initConnection(String id, String jdbc, String user, String psword, boolean log, int flags) throws SQLException GetSqliteDriver2instance, with database connection got viaDriverManager.- Parameters:
jdbc-user-psword-log-flags-- Returns:
- SqliteDriver2 instance
- Throws:
SQLException
-
select
- Specified by:
selectin classAbsConnect<SqliteDriver2>- Throws:
SQLException
-
commit
Commit statement- Specified by:
commitin classAbsConnect<SqliteDriver2>- Parameters:
sqls-flags-- Returns:
- The update counts in order of commands
- Throws:
SQLException
-
commit
public int[] commit(io.odysz.semantics.IUser usr, ArrayList<String> sqls, ArrayList<Clob> lobs, int i) throws SQLException - Specified by:
commitin classAbsConnect<SqliteDriver2>- Throws:
SQLException
-