FileDocCategorySizeDatePackage
SQLiteDirectCursorDriver.javaAPI DocAndroid 5.1 API2467Thu Mar 12 22:22:10 GMT 2015android.database.sqlite

SQLiteDirectCursorDriver

public final class SQLiteDirectCursorDriver extends Object implements SQLiteCursorDriver
A cursor driver that uses the given query directly.
hide

Fields Summary
private final SQLiteDatabase
mDatabase
private final String
mEditTable
private final String
mSql
private final android.os.CancellationSignal
mCancellationSignal
private SQLiteQuery
mQuery
Constructors Summary
public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable, android.os.CancellationSignal cancellationSignal)

        mDatabase = db;
        mEditTable = editTable;
        mSql = sql;
        mCancellationSignal = cancellationSignal;
    
Methods Summary
public voidcursorClosed()

        // Do nothing
    
public voidcursorDeactivated()

        // Do nothing
    
public voidcursorRequeried(android.database.Cursor cursor)

        // Do nothing
    
public android.database.Cursorquery(android.database.sqlite.SQLiteDatabase.CursorFactory factory, java.lang.String[] selectionArgs)

        final SQLiteQuery query = new SQLiteQuery(mDatabase, mSql, mCancellationSignal);
        final Cursor cursor;
        try {
            query.bindAllArgsAsStrings(selectionArgs);

            if (factory == null) {
                cursor = new SQLiteCursor(this, mEditTable, query);
            } else {
                cursor = factory.newCursor(mDatabase, this, mEditTable, query);
            }
        } catch (RuntimeException ex) {
            query.close();
            throw ex;
        }

        mQuery = query;
        return cursor;
    
public voidsetBindArguments(java.lang.String[] bindArgs)

        mQuery.bindAllArgsAsStrings(bindArgs);
    
public java.lang.StringtoString()

        return "SQLiteDirectCursorDriver: " + mSql;