@Override public Long call(final SQLiteStatement statement) throws Exception { if (!statement.step()) { throw new SQLiteException(SQLiteConstants.SQLITE_DONE, "No rows returned from query"); } return statement.columnLong(0); } });
@Override public String call(final SQLiteStatement statement) throws Exception { if (!statement.step()) { throw new SQLiteException(SQLiteConstants.SQLITE_DONE, "No rows returned from query"); } return statement.columnString(0); } });
private SWIGTYPE_p_sqlite3_blob handle() throws SQLiteException { SWIGTYPE_p_sqlite3_blob handle = myHandle; if (handle == null) { throw new SQLiteException(SQLiteConstants.WRAPPER_BLOB_DISPOSED, null); } return handle; }
private SWIGTYPE_p_sqlite3_stmt handle() throws SQLiteException { SWIGTYPE_p_sqlite3_stmt handle = myHandle; if (handle == null) { throw new SQLiteException(WRAPPER_STATEMENT_DISPOSED, null); } return handle; }
private SWIGTYPE_p_intarray handle() throws SQLiteException { SWIGTYPE_p_intarray handle = myHandle; if (handle == null) { throw new SQLiteException(WRAPPER_STATEMENT_DISPOSED, null); } return handle; }
private SWIGTYPE_p_sqlite3_backup handle() throws SQLiteException { SWIGTYPE_p_sqlite3_backup handle = myHandle; if (handle == null) { throw new SQLiteException(WRAPPER_BACKUP_DISPOSED, null); } return handle; }
private SWIGTYPE_p_sqlite3 handle() throws SQLiteException { synchronized (myLock) { if (myDisposed) throw new SQLiteException(WRAPPER_MISUSE, "connection is disposed"); SWIGTYPE_p_sqlite3 handle = myHandle; if (handle == null) throw new SQLiteException(WRAPPER_NOT_OPENED, null); return handle; } }
void checkThread() throws SQLiteException { Thread confinement = myConfinement; if (confinement == null) { throw new SQLiteException(WRAPPER_MISUSE, this + " is not confined or already disposed"); } Thread thread = Thread.currentThread(); if (thread != confinement) { String message = this + " confined(" + confinement + ") used (" + thread + ")"; throw new SQLiteException(WRAPPER_CONFINEMENT_VIOLATED, message); } }
private void checkColumn(int column, SWIGTYPE_p_sqlite3_stmt handle, boolean mustHaveRow) throws SQLiteException { // assert right thread if (mustHaveRow && !myHasRow) throw new SQLiteException(WRAPPER_NO_ROW, null); if (column < 0) throw new SQLiteException(WRAPPER_COLUMN_OUT_OF_RANGE, String.valueOf(column)); int columnCount = getColumnCount(handle); if (column >= columnCount) throw new SQLiteException(WRAPPER_COLUMN_OUT_OF_RANGE, column + "(" + columnCount + ")"); }
public int getColumnIndex(String colName) throws SQLiteException { if (resultDesc.colIdxByColName.containsKey(colName) == false) { throw new SQLiteException(-1, "undefined column '" + colName + "' in query: "+ this.queryString); } return resultDesc.colIdxByColName.get(colName); }
public int getColumnIndex(String colName) throws SQLiteException { if (resultDesc.colIdxByColName.containsKey(colName) == false) { throw new SQLiteException(-1, "undefined column '" + colName + "' in query: "+ this.queryString); } return resultDesc.colIdxByColName.get(colName); }
/** * Wraps <code>getBindParameterIndex</code> method * @throws SQLiteException if parameter with specified name was not found */ private int getValidBindParameterIndex(String name) throws SQLiteException { int index = getBindParameterIndex(name); if (index == 0) { throw new SQLiteException(WRAPPER_INVALID_ARG_1, "failed to find parameter with specified name (" + name + ")"); } return index; }
@Override public Long call() throws SQLiteException { SQLiteStatement stmt = stmt(connectionPtr, statementPtr); if (!stmt.step()) { throw new SQLiteException(SQLiteConstants.SQLITE_DONE, "No rows returned from query"); } return stmt.columnLong(0); } });
@Override public String call() throws SQLiteException { SQLiteStatement stmt = stmt(connectionPtr, statementPtr); if (!stmt.step()) { throw new SQLiteException(SQLiteConstants.SQLITE_DONE, "No rows returned from query"); } return stmt.columnString(0); } });
@Override public Long call(final SQLiteStatement statement) throws Exception { if (!statement.step()) { throw new SQLiteException(SQLiteConstants.SQLITE_DONE, "No rows returned from query"); } return statement.columnLong(0); } });
@Override public Long call() throws SQLiteException { SQLiteStatement stmt = stmt(connectionPtr, statementPtr); if (!stmt.step()) { throw new SQLiteException(SQLiteConstants.SQLITE_DONE, "No rows returned from query"); } return stmt.columnLong(0); } });
@Override public String call() throws SQLiteException { SQLiteStatement stmt = stmt(connectionPtr, statementPtr); if (!stmt.step()) { throw new SQLiteException(SQLiteConstants.SQLITE_DONE, "No rows returned from query"); } return stmt.columnString(0); } });
@Override public Long call(final SQLiteStatement statement) throws Exception { if (!statement.step()) { throw new SQLiteException(SQLiteConstants.SQLITE_DONE, "No rows returned from query"); } return statement.columnLong(0); } });
@Override public String call(final SQLiteStatement statement) throws Exception { if (!statement.step()) { throw new SQLiteException(SQLiteConstants.SQLITE_DONE, "No rows returned from query"); } return statement.columnString(0); } });
@Override public String call(final SQLiteStatement statement) throws Exception { if (!statement.step()) { throw new SQLiteException(SQLiteConstants.SQLITE_DONE, "No rows returned from query"); } return statement.columnString(0); } });