-
- All Implemented Interfaces:
-
app.cash.sqldelight.db.SqlDriver,java.io.Closeable,java.lang.AutoCloseable
public final class AndroidSqliteDriver implements SqlDriver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classAndroidSqliteDriver.Transactionpublic classAndroidSqliteDriver.Callback
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description UnitaddListener(String queryKeys, Query.Listener listener)UnitremoveListener(String queryKeys, Query.Listener listener)UnitnotifyListeners(String queryKeys)QueryResult<Transacter.Transaction>newTransaction()Transacter.TransactioncurrentTransaction()QueryResult<Long>execute(Integer identifier, String sql, Integer parameters, Function1<SqlPreparedStatement, Unit> binders)<R extends Any> QueryResult.Value<R>executeQuery(Integer identifier, String sql, Function1<SqlCursor, QueryResult<R>> mapper, Integer parameters, Function1<SqlPreparedStatement, Unit> binders)Unitclose()-
-
Constructor Detail
-
AndroidSqliteDriver
AndroidSqliteDriver(SupportSQLiteOpenHelper openHelper)
-
AndroidSqliteDriver
AndroidSqliteDriver(SqlSchema<QueryResult.Value<Unit>> schema, Context context, String name, SupportSQLiteOpenHelper.Factory factory, SupportSQLiteOpenHelper.Callback callback, Integer cacheSize, Boolean useNoBackupDirectory, Long windowSizeBytes)
- Parameters:
cacheSize- The number of compiled sqlite statements to keep in memory per connection.useNoBackupDirectory- Sets whether to use a no backup directory or not.windowSizeBytes- Size of cursor window in bytes, per CursorWindow (Android 28+ only), or null to use the default.
-
AndroidSqliteDriver
AndroidSqliteDriver(SqlSchema<QueryResult.Value<Unit>> schema, Context context, String name, SupportSQLiteOpenHelper.Factory factory, SupportSQLiteOpenHelper.Callback callback, Integer cacheSize, Boolean useNoBackupDirectory)
- Parameters:
cacheSize- The number of compiled sqlite statements to keep in memory per connection.useNoBackupDirectory- Sets whether to use a no backup directory or not.
-
AndroidSqliteDriver
AndroidSqliteDriver(SqlSchema<QueryResult.Value<Unit>> schema, Context context, String name, SupportSQLiteOpenHelper.Factory factory, SupportSQLiteOpenHelper.Callback callback, Integer cacheSize)
- Parameters:
cacheSize- The number of compiled sqlite statements to keep in memory per connection.
-
AndroidSqliteDriver
AndroidSqliteDriver(SqlSchema<QueryResult.Value<Unit>> schema, Context context, String name, SupportSQLiteOpenHelper.Factory factory, SupportSQLiteOpenHelper.Callback callback)
-
AndroidSqliteDriver
AndroidSqliteDriver(SqlSchema<QueryResult.Value<Unit>> schema, Context context, String name, SupportSQLiteOpenHelper.Factory factory)
-
AndroidSqliteDriver
AndroidSqliteDriver(SqlSchema<QueryResult.Value<Unit>> schema, Context context, String name)
-
AndroidSqliteDriver
AndroidSqliteDriver(SupportSQLiteDatabase database, Integer cacheSize, Long windowSizeBytes)
-
AndroidSqliteDriver
AndroidSqliteDriver(SupportSQLiteDatabase database, Integer cacheSize)
-
AndroidSqliteDriver
AndroidSqliteDriver(SupportSQLiteDatabase database)
-
-
Method Detail
-
addListener
Unit addListener(String queryKeys, Query.Listener listener)
-
removeListener
Unit removeListener(String queryKeys, Query.Listener listener)
-
notifyListeners
Unit notifyListeners(String queryKeys)
-
newTransaction
QueryResult<Transacter.Transaction> newTransaction()
-
currentTransaction
Transacter.Transaction currentTransaction()
-
execute
QueryResult<Long> execute(Integer identifier, String sql, Integer parameters, Function1<SqlPreparedStatement, Unit> binders)
-
executeQuery
<R extends Any> QueryResult.Value<R> executeQuery(Integer identifier, String sql, Function1<SqlCursor, QueryResult<R>> mapper, Integer parameters, Function1<SqlPreparedStatement, Unit> binders)
-
-
-
-