Methods Summary |
---|
public boolean | busy(java.lang.String table, int count)
return busy0(db, count);
|
private boolean | busy0(SQLite.JDBC2y.DatabaseX db, int count)
if (count <= 1) {
t0 = System.currentTimeMillis();
}
if (db != null) {
long t1 = System.currentTimeMillis();
if (t1 - t0 > timeout) {
return false;
}
db.wait(100);
return true;
}
return false;
|
protected boolean | busy3(SQLite.JDBC2y.DatabaseX db, int count)
if (count <= 1) {
t0 = System.currentTimeMillis();
}
if (db != null) {
long t1 = System.currentTimeMillis();
if (t1 - t0 > timeout) {
return false;
}
return true;
}
return false;
|
public void | clearWarnings()
|
public void | close()
try {
rollback();
} catch (SQLException e) {
/* ignored */
}
intrans = false;
if (db != null) {
try {
db.close();
db = null;
} catch (SQLite.Exception e) {
throw new SQLException(e.toString());
}
}
|
public void | commit()
if (db == null) {
throw new SQLException("stale connection");
}
if (!intrans) {
return;
}
try {
db.exec("COMMIT", null);
intrans = false;
} catch (SQLite.Exception e) {
throw new SQLException(e.toString());
}
|
public java.sql.Statement | createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
if (resultSetHoldability != ResultSet.HOLD_CURSORS_OVER_COMMIT) {
throw new SQLException("not supported");
}
return createStatement(resultSetType, resultSetConcurrency);
|
public java.sql.Statement | createStatement()
JDBCStatement s = new JDBCStatement(this);
return s;
|
public java.sql.Statement | createStatement(int resultSetType, int resultSetConcurrency)
JDBCStatement s = new JDBCStatement(this);
return s;
|
public boolean | getAutoCommit()
return autocommit;
|
public java.lang.String | getCatalog()
return null;
|
public int | getHoldability()
return ResultSet.HOLD_CURSORS_OVER_COMMIT;
|
public java.sql.DatabaseMetaData | getMetaData()
if (meta == null) {
meta = new JDBCDatabaseMetaData(this);
}
return meta;
|
public SQLite.Database | getSQLiteDatabase()
return (SQLite.Database) db;
|
public int | getTransactionIsolation()
return TRANSACTION_SERIALIZABLE;
|
public java.util.Map | getTypeMap()
throw new SQLException("not supported");
|
public java.sql.SQLWarning | getWarnings()
return null;
|
public boolean | isClosed()
return db == null;
|
public boolean | isReadOnly()
return readonly;
|
public java.lang.String | nativeSQL(java.lang.String sql)
throw new SQLException("not supported");
|
private SQLite.JDBC2y.DatabaseX | open(boolean readonly)
DatabaseX db = null;
try {
db = new DatabaseX();
db.open(dbfile, readonly ? 0444 : 0644);
db.set_encoding(enc);
} catch (SQLite.Exception e) {
throw new SQLException(e.toString());
}
int loop = 0;
while (true) {
try {
db.exec("PRAGMA short_column_names = off;", null);
db.exec("PRAGMA full_column_names = on;", null);
db.exec("PRAGMA empty_result_callbacks = on;", null);
if (SQLite.Database.version().compareTo("2.6.0") >= 0) {
db.exec("PRAGMA show_datatypes = on;", null);
}
} catch (SQLite.Exception e) {
if (db.last_error() != SQLite.Constants.SQLITE_BUSY ||
!busy0(db, ++loop)) {
try {
db.close();
} catch (SQLite.Exception ee) {
}
throw new SQLException(e.toString());
}
continue;
}
break;
}
return db;
|
public java.sql.CallableStatement | prepareCall(java.lang.String sql)
throw new SQLException("not supported");
|
public java.sql.CallableStatement | prepareCall(java.lang.String sql, int x, int y)
throw new SQLException("not supported");
|
public java.sql.CallableStatement | prepareCall(java.lang.String sql, int x, int y, int z)
throw new SQLException("not supported");
|
public java.sql.PreparedStatement | prepareStatement(java.lang.String sql)
JDBCPreparedStatement s = new JDBCPreparedStatement(this, sql);
return s;
|
public java.sql.PreparedStatement | prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency)
JDBCPreparedStatement s = new JDBCPreparedStatement(this, sql);
return s;
|
public java.sql.PreparedStatement | prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
if (resultSetHoldability != ResultSet.HOLD_CURSORS_OVER_COMMIT) {
throw new SQLException("not supported");
}
return prepareStatement(sql, resultSetType, resultSetConcurrency);
|
public java.sql.PreparedStatement | prepareStatement(java.lang.String sql, int autokeys)
if (autokeys != Statement.NO_GENERATED_KEYS) {
throw new SQLException("not supported");
}
return prepareStatement(sql);
|
public java.sql.PreparedStatement | prepareStatement(java.lang.String sql, int[] colIndexes)
throw new SQLException("not supported");
|
public java.sql.PreparedStatement | prepareStatement(java.lang.String sql, java.lang.String[] columns)
throw new SQLException("not supported");
|
public void | releaseSavepoint(java.sql.Savepoint x)
throw new SQLException("not supported");
|
public void | rollback()
if (db == null) {
throw new SQLException("stale connection");
}
if (!intrans) {
return;
}
try {
db.exec("ROLLBACK", null);
intrans = false;
} catch (SQLite.Exception e) {
throw new SQLException(e.toString());
}
|
public void | rollback(java.sql.Savepoint x)
throw new SQLException("not supported");
|
public void | setAutoCommit(boolean ac)
if (ac && intrans && db != null) {
try {
db.exec("ROLLBACK", null);
} catch (SQLite.Exception e) {
throw new SQLException(e.toString());
}
}
intrans = false;
autocommit = ac;
|
public void | setCatalog(java.lang.String catalog)
|
public void | setHoldability(int holdability)
if (holdability == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
return;
}
throw new SQLException("not supported");
|
public void | setReadOnly(boolean ro)
if (intrans) {
throw new SQLException("incomplete transaction");
}
if (ro != readonly) {
DatabaseX db = null;
try {
db = open(ro);
this.db.close();
this.db = db;
db = null;
readonly = ro;
} catch (SQLException e) {
throw e;
} catch (SQLite.Exception ee) {
if (db != null) {
try {
db.close();
} catch (SQLite.Exception eee) {
}
}
throw new SQLException(ee.toString());
}
}
|
public java.sql.Savepoint | setSavepoint()
throw new SQLException("not supported");
|
public java.sql.Savepoint | setSavepoint(java.lang.String name)
throw new SQLException("not supported");
|
public void | setTransactionIsolation(int level)
if (level != TRANSACTION_SERIALIZABLE) {
throw new SQLException("not supported");
}
|
public void | setTypeMap(java.util.Map map)
throw new SQLException("not supported");
|