Sdílet prostřednictvím


SQLiteOpenHelper.OnConfigure(SQLiteDatabase) Method

Definition

Called when the database connection is being configured, to enable features such as write-ahead logging or foreign key support.

[Android.Runtime.Register("onConfigure", "(Landroid/database/sqlite/SQLiteDatabase;)V", "GetOnConfigure_Landroid_database_sqlite_SQLiteDatabase_Handler")]
public virtual void OnConfigure (Android.Database.Sqlite.SQLiteDatabase? db);
[<Android.Runtime.Register("onConfigure", "(Landroid/database/sqlite/SQLiteDatabase;)V", "GetOnConfigure_Landroid_database_sqlite_SQLiteDatabase_Handler")>]
abstract member OnConfigure : Android.Database.Sqlite.SQLiteDatabase -> unit
override this.OnConfigure : Android.Database.Sqlite.SQLiteDatabase -> unit

Parameters

db
SQLiteDatabase

The database.

Attributes

Remarks

Called when the database connection is being configured, to enable features such as write-ahead logging or foreign key support.

This method is called before #onCreate, #onUpgrade, #onDowngrade, or #onOpen are called. It should not modify the database except to configure the database connection as required.

This method should only call methods that configure the parameters of the database connection, such as SQLiteDatabase#enableWriteAheadLoggingSQLiteDatabase#setForeignKeyConstraintsEnabled, SQLiteDatabase#setLocale, SQLiteDatabase#setMaximumSize, or executing PRAGMA statements.

Java documentation for android.database.sqlite.SQLiteOpenHelper.onConfigure(android.database.sqlite.SQLiteDatabase).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to