Added in API level 27

OpenParams


class OpenParams
kotlin.Any
   ↳ android.database.sqlite.SQLiteDatabase.OpenParams

Wrapper for configuration parameters that are used for opening SQLiteDatabase

Summary

Nested classes

Builder for OpenParams.

Public methods
SQLiteDatabase.CursorFactory?

Returns an optional factory class that is called to instantiate a cursor when query is called

DatabaseErrorHandler?

Returns handler for database corruption errors

Long

Returns maximum number of milliseconds that SQLite connection is allowed to be idle before it is closed and removed from the pool.

String?

Returns journal mode.

Int

Returns total number of lookaside memory slots per database connection or -1 if not set.

Int

Returns size in bytes of each lookaside slot or -1 if not set.

Int

Returns flags to control database access mode.

String?

Returns synchronous mode.

Public methods

getCursorFactory

Added in API level 27
fun getCursorFactory(): SQLiteDatabase.CursorFactory?

Returns an optional factory class that is called to instantiate a cursor when query is called

Return
SQLiteDatabase.CursorFactory? This value may be null.

getErrorHandler

Added in API level 27
fun getErrorHandler(): DatabaseErrorHandler?

Returns handler for database corruption errors

Return
DatabaseErrorHandler? This value may be null.

getIdleConnectionTimeout

Added in API level 27
fun getIdleConnectionTimeout(): Long

Returns maximum number of milliseconds that SQLite connection is allowed to be idle before it is closed and removed from the pool.

If the value isn't set, the timeout defaults to the system wide timeout

Return
Long timeout in milliseconds or -1 if the value wasn't set.

getJournalMode

Added in API level 28
fun getJournalMode(): String?

Returns journal mode. set via Builder#setJournalMode(String).

Return
String? This value may be null.

getLookasideSlotCount

Added in API level 27
fun getLookasideSlotCount(): Int

Returns total number of lookaside memory slots per database connection or -1 if not set.

Return
Int Value is -1 or greater

getLookasideSlotSize

Added in API level 27
fun getLookasideSlotSize(): Int

Returns size in bytes of each lookaside slot or -1 if not set.

Return
Int Value is -1 or greater

getSynchronousMode

Added in API level 28
fun getSynchronousMode(): String?

Returns synchronous mode. If not set, a system wide default will be used.

Return
String? This value may be null.