SupportSQLiteOpenHelper

public interface SupportSQLiteOpenHelper
implements Closeable

androidx.sqlite.db.SupportSQLiteOpenHelper


An interface to map the behavior of SQLiteOpenHelper. Note that since that class requires overriding certain methods, support implementation uses SupportSQLiteOpenHelper.Factory.create(Configuration) to create this and SupportSQLiteOpenHelper.Callback to implement the methods that should be overridden.

Summary

Nested classes

class SupportSQLiteOpenHelper.Callback

Handles various lifecycle events for the SQLite connection, similar to SQLiteOpenHelper

class SupportSQLiteOpenHelper.Configuration

The configuration to create an SQLite open helper object using SupportSQLiteOpenHelper.Factory

interface SupportSQLiteOpenHelper.Factory

Factory class to create instances of SupportSQLiteOpenHelper using SupportSQLiteOpenHelper.Configuration

Public methods

abstract void close()

Close any open database object.

abstract String getDatabaseName()

Return the name of the SQLite database being opened, as given to the constructor.

abstract SupportSQLiteDatabase getReadableDatabase()

Create and/or open a database.

abstract SupportSQLiteDatabase getWritableDatabase()

Create and/or open a database that will be used for reading and writing.

abstract void setWriteAheadLoggingEnabled(boolean enabled)

Enables or disables the use of write-ahead logging for the database.

Inherited methods

Public methods

close

public abstract void close ()

Close any open database object.

getDatabaseName

public abstract String getDatabaseName ()

Return the name of the SQLite database being opened, as given to the constructor. null indicates an in-memory database.

Returns
String

getReadableDatabase