Batchlight

batchlight / co.yello.db.batchlight.androidsqlite / SQLiteBinderConfig

SQLiteBinderConfig

class SQLiteBinderConfig : BinderConfig

The BinderConfig for Android SQLite.

Constructors

Name Summary
<init> SQLiteBinderConfig(db: SQLiteDatabase, batchStatement: String, fieldsPerItem: Int, maxFields: Int)

Properties

Name Summary
fieldsPerItem val fieldsPerItem: Int
the number of fields per row to be inserted.
maxFields val maxFields: Int
the maximum number of binds that can happen per statement.
maxInsertBinder val maxInsertBinder: Binder
Holds a reference to the max insert binder. This will be the most common case so it should be cached.
maxInsertSize val maxInsertSize: Int
The maximum number of items that can be inserted per statement.
startIndex val startIndex: Int

Functions

Name Summary
buildBinder fun buildBinder(insertCount: Int): Binder
Creates a Binder that has the given number of bind locations.

Companion Object Functions

Name Summary
getInsertConfig fun getInsertConfig(db: SQLiteDatabase, tableName: String, columnCount: Int, maxBinds: Int = sqlMaxBinds): SQLiteBinderConfig
Creates a statement generator for batch insert statements.
getReplaceConfig fun getReplaceConfig(db: SQLiteDatabase, tableName: String, columnCount: Int, maxBinds: Int = sqlMaxBinds): SQLiteBinderConfig
Creates a statement generator for batch replace statements.