Example usage for android.database.sqlite SQLiteDatabase getThreadDefaultConnectionFlags

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

Introduction

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

Prototype

int getThreadDefaultConnectionFlags(boolean readOnly) 

Source Link

Document

Gets default connection flags that are appropriate for this thread, taking into account whether the thread is acting on behalf of the UI.

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   w w w. j a  va2s. com
private void validateQuerySql(SQLiteDatabase db, String sql, CancellationSignal cancellationSignal) {

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