Class SQLiteDatabaseClient.Builder
java.lang.Object
dev.rafex.ether.database.sqlite.client.SQLiteDatabaseClient.Builder
- Enclosing class:
SQLiteDatabaseClient
Builder for
SQLiteDatabaseClient.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theSQLiteDatabaseClient.withBusyTimeout(int timeout) Sets the busy timeout in milliseconds.withConfig(SQLiteConfig config) Sets a custom SQLite configuration.withForeignKeys(boolean enabled) Enables or disables foreign key constraints.withJournalMode(JournalMode mode) Sets the journal mode.Sets the synchronous mode.Enables Write-Ahead Logging (WAL) mode.
-
Method Details
-
withWalEnabled
Enables Write-Ahead Logging (WAL) mode.- Returns:
- this builder
-
withSynchronousMode
Sets the synchronous mode.- Parameters:
mode- the synchronous mode- Returns:
- this builder
-
withJournalMode
Sets the journal mode.- Parameters:
mode- the journal mode- Returns:
- this builder
-
withForeignKeys
Enables or disables foreign key constraints.- Parameters:
enabled-trueto enable foreign keys,falseto disable- Returns:
- this builder
-
withBusyTimeout
Sets the busy timeout in milliseconds.- Parameters:
timeout- the busy timeout in milliseconds- Returns:
- this builder
-
withConfig
Sets a custom SQLite configuration.- Parameters:
config- the SQLite configuration- Returns:
- this builder
-
build
Builds theSQLiteDatabaseClient.- Returns:
- a new
SQLiteDatabaseClientinstance
-