SupportSQLiteOpenHelper.Configuration.Builder



Builder class for Configuration.

Summary

Public functions

open SupportSQLiteOpenHelper.Configuration.Builder
allowDataLossOnRecovery(allowDataLossOnRecovery: Boolean)

Sets whether to delete and recreate the database file in situations when the database file cannot be opened, thus allowing for its data to be lost.

android
open SupportSQLiteOpenHelper.Configuration

Throws an IllegalArgumentException if the Callback is null.

android
open SupportSQLiteOpenHelper.Configuration.Builder
android
open SupportSQLiteOpenHelper.Configuration.Builder
name(name: String?)
android
open SupportSQLiteOpenHelper.Configuration.Builder
noBackupDirectory(useNoBackupDirectory: Boolean)

Sets whether to use a no backup directory or not.

android

Public functions

allowDataLossOnRecovery

open fun allowDataLossOnRecovery(allowDataLossOnRecovery: Boolean): SupportSQLiteOpenHelper.Configuration.Builder

Sets whether to delete and recreate the database file in situations when the database file cannot be opened, thus allowing for its data to be lost.

Parameters
allowDataLossOnRecovery: Boolean

If true the database file might be recreated in the case that it cannot be opened.

build

open fun build(): SupportSQLiteOpenHelper.Configuration

Throws an IllegalArgumentException if the Callback is null.

Throws an IllegalArgumentException if the Context is null.

Throws an IllegalArgumentException if the String database name is null. Context.getNoBackupFilesDir

callback

open fun callback(callback: SupportSQLiteOpenHelper.Callback): SupportSQLiteOpenHelper.Configuration.Builder
Parameters
callback: SupportSQLiteOpenHelper.Callback

The callback class to handle creation, upgrade and downgrade.

Returns
SupportSQLiteOpenHelper.Configuration.Builder

This builder instance.

name

open fun name(name: String?): SupportSQLiteOpenHelper.Configuration.Builder
Parameters
name: String?

Name of the database file, or null for an in-memory database.

Returns
SupportSQLiteOpenHelper.Configuration.Builder

This builder instance.

noBackupDirectory

open fun noBackupDirectory(useNoBackupDirectory: Boolean): SupportSQLiteOpenHelper.Configuration.Builder

Sets whether to use a no backup directory or not.

Parameters
useNoBackupDirectory: Boolean

If true the database file will be stored in the no-backup directory.

Returns
SupportSQLiteOpenHelper.Configuration.Builder

This builder instance.