Builder
open class Builder
kotlin.Any | |
↳ | androidx.sqlite.db.SupportSQLiteOpenHelper.Configuration.Builder |
Builder class for Configuration
.
Summary
Public methods | |
---|---|
open SupportSQLiteOpenHelper.Configuration |
build() Throws an |
open SupportSQLiteOpenHelper.Configuration.Builder |
callback(@NonNull callback: SupportSQLiteOpenHelper.Callback) |
open SupportSQLiteOpenHelper.Configuration.Builder | |
open SupportSQLiteOpenHelper.Configuration.Builder |
noBackupDirectory(useNoBackUpDirectory: Boolean) Sets whether to use a no backup directory or not. |
Public methods
build
@NonNull 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
. {@see Context#getNoBackupFilesDir()}
Return | |
---|---|
SupportSQLiteOpenHelper.Configuration |
The Configuration instance |
callback
@NonNull open fun callback(@NonNull callback: SupportSQLiteOpenHelper.Callback): SupportSQLiteOpenHelper.Configuration.Builder
Parameters | |
---|---|
callback |
SupportSQLiteOpenHelper.Callback: The callback class to handle creation, upgrade and downgrade. |
Return | |
---|---|
SupportSQLiteOpenHelper.Configuration.Builder |
this |
name
@NonNull open fun name(@Nullable name: String?): SupportSQLiteOpenHelper.Configuration.Builder
Parameters | |
---|---|
name |
String?: Name of the database file, or null for an in-memory database. |
Return | |
---|---|
SupportSQLiteOpenHelper.Configuration.Builder |
This |
noBackupDirectory
@NonNull 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. |
Return | |
---|---|
SupportSQLiteOpenHelper.Configuration.Builder |
this |