@Override public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) { supportQuery.bindTo(query); return new SQLiteCursor(masterQuery, editTable, query); } }, supportQuery.getSql(), new String[0], null, signal);
/** * Runs the provided SQL and returns a {@link Cursor} over the result set. * * @param supportQuery the SQL query. The SQL string must not be ; terminated * @param signal A signal to cancel the operation in progress, or null if none. * If the operation is canceled, then {@link OperationCanceledException} will be thrown * when the query is executed. * @return A {@link Cursor} object, which is positioned before the first entry. Note that * {@link Cursor}s are not synchronized, see the documentation for more details. */ public Cursor query(final SupportSQLiteQuery supportQuery, CancellationSignal signal) { return rawQueryWithFactory(new CursorFactory() { @Override public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) { supportQuery.bindTo(query); return new SQLiteCursor(masterQuery, editTable, query); } }, supportQuery.getSql(), new String[0], null, signal); }
/** * {@inheritDoc} */ @Override public Cursor query(final SupportSQLiteQuery supportQuery, CancellationSignal signal) { BindingsRecorder hack=new BindingsRecorder(); supportQuery.bindTo(hack); return(safeDb.rawQueryWithFactory( new net.sqlcipher.database.SQLiteDatabase.CursorFactory() { @Override public net.sqlcipher.Cursor newCursor( net.sqlcipher.database.SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) { supportQuery.bindTo(new Program(query)); return new SQLiteCursor(db, masterQuery, editTable, query); } }, supportQuery.getSql(), hack.getBindings(), null)); }
@Override public net.sqlcipher.Cursor newCursor( net.sqlcipher.database.SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) { supportQuery.bindTo(new Program(query)); return new SQLiteCursor(db, masterQuery, editTable, query); } }, supportQuery.getSql(), hack.getBindings(), null));