Example usage for android.database.sqlite SQLiteDatabase getThreadSession

List of usage examples for android.database.sqlite SQLiteDatabase getThreadSession

Introduction

In this page you can find the example usage for android.database.sqlite SQLiteDatabase getThreadSession.

Prototype

@UnsupportedAppUsage
SQLiteSession getThreadSession() 

Source Link

Document

Gets the SQLiteSession that belongs to this thread for this database.

Usage

From source file:io.requery.android.database.sqlite.SQLiteQueryBuilder.java

/**
 * Verifies that a SQL SELECT statement is valid by compiling it.
 * If the SQL statement is not valid, this method will throw a {@link SQLiteException}.
 *//*from  ww w.  j a  va 2s  .c  om*/
private void validateQuerySql(SQLiteDatabase db, String sql, CancellationSignal cancellationSignal) {

    db.getThreadSession().prepare(sql, db.getThreadDefaultConnectionFlags(true /*readOnly*/),
            cancellationSignal, null);
}