-
public final class SQLiteDatabaseConfiguration
Describes how to configure a database.
The purpose of this object is to keep track of all of the little configuration settings that are applied to a database after it is opened so that they can be applied to all connections in the connection pool uniformly.
Each connection maintains its own copy of this object so it can keep track of which settings have already been applied.
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
MEMORY_DB_PATH
public final String
path
public final String
label
public int
openFlags
public int
maxSqlCacheSize
public Locale
locale
public boolean
foreignKeyConstraintsEnabled
public Array<byte>
password
public SQLiteDatabaseHook
databaseHook
public final ArrayList<SQLiteCustomFunction>
customFunctions
-
Constructor Summary
Constructors Constructor Description SQLiteDatabaseConfiguration(String path, int openFlags)
Creates a database configuration with the required parameters for opening adatabase and default values for all other parameters. SQLiteDatabaseConfiguration(String path, int openFlags, Array<byte> password, SQLiteDatabaseHook databaseHook)
Creates a database configuration with the required parameters for opening adatabase and default values for all other parameters. SQLiteDatabaseConfiguration(SQLiteDatabaseConfiguration other)
Creates a database configuration as a copy of another configuration.
-
Method Summary
Modifier and Type Method Description void
updateParametersFrom(SQLiteDatabaseConfiguration other)
Updates the non-immutable parameters of this configuration objectfrom the other configuration object. boolean
isInMemoryDb()
Returns true if the database is in-memory. -
-
Constructor Detail
-
SQLiteDatabaseConfiguration
SQLiteDatabaseConfiguration(String path, int openFlags)
Creates a database configuration with the required parameters for opening adatabase and default values for all other parameters.- Parameters:
path
- The database path.openFlags
- Open flags for the database, such as OPEN_READWRITE.
-
SQLiteDatabaseConfiguration
SQLiteDatabaseConfiguration(String path, int openFlags, Array<byte> password, SQLiteDatabaseHook databaseHook)
Creates a database configuration with the required parameters for opening adatabase and default values for all other parameters.- Parameters:
path
- The database path.openFlags
- Open flags for the database, such as OPEN_READWRITE.password
- The password to use for a SQLCipher database
-
SQLiteDatabaseConfiguration
SQLiteDatabaseConfiguration(SQLiteDatabaseConfiguration other)
Creates a database configuration as a copy of another configuration.- Parameters:
other
- The other configuration.
-
-
Method Detail
-
updateParametersFrom
void updateParametersFrom(SQLiteDatabaseConfiguration other)
Updates the non-immutable parameters of this configuration objectfrom the other configuration object.
- Parameters:
other
- The object from which to copy the parameters.
-
isInMemoryDb
boolean isInMemoryDb()
Returns true if the database is in-memory.
-
-
-
-