Utility to apply SQLite PRAGMA settings to a connection. More...
Static Public Member Functions | |
| static void | apply (Connection connection, SQLiteConfig config) throws SQLException |
| Applies configuration to a SQLite connection. | |
| static void | applyDefaults (Connection connection) throws SQLException |
| Applies default configuration to a SQLite connection. | |
| static void | disableWal (Connection connection) throws SQLException |
| Disables Write-Ahead Logging (WAL) mode on a connection. | |
| static void | enableWal (Connection connection) throws SQLException |
| Enables Write-Ahead Logging (WAL) mode on a connection. | |
| static void | setSynchronousMode (Connection connection, SynchronousMode mode) throws SQLException |
| Sets the synchronous mode on a connection. | |
Utility to apply SQLite PRAGMA settings to a connection.
This class helps configure SQLite connections with optimal settings for performance, durability, and feature compatibility.
Definition at line 40 of file SQLitePragmas.java.
|
static |
Applies configuration to a SQLite connection.
Executes the necessary PRAGMA statements to configure the connection according to the provided configuration.
| connection | SQLite connection |
| config | configuration to apply |
| SQLException | if any PRAGMA statement fails |
| NullPointerException | if connection or config is null |
Definition at line 57 of file SQLitePragmas.java.
References dev.rafex.ether.database.sqlite.config.SynchronousMode.EXTRA, dev.rafex.ether.database.sqlite.config.SynchronousMode.FULL, dev.rafex.ether.database.sqlite.config.SynchronousMode.NORMAL, and dev.rafex.ether.database.sqlite.config.SynchronousMode.OFF.
Referenced by applyDefaults().
|
static |
Applies default configuration to a SQLite connection.
Equivalent to apply(connection, SQLiteConfig.defaults()).
| connection | SQLite connection |
| SQLException | if any PRAGMA statement fails |
| NullPointerException | if connection is null |
Definition at line 106 of file SQLitePragmas.java.
References apply(), and dev.rafex.ether.database.sqlite.config.SQLiteConfig.defaults().
|
static |
Disables Write-Ahead Logging (WAL) mode on a connection.
This is a convenience method for disabling WAL mode specifically.
| connection | SQLite connection |
| SQLException | if the PRAGMA statement fails |
| NullPointerException | if connection is null |
Definition at line 135 of file SQLitePragmas.java.
|
static |
Enables Write-Ahead Logging (WAL) mode on a connection.
This is a convenience method for enabling WAL mode specifically.
| connection | SQLite connection |
| SQLException | if the PRAGMA statement fails |
| NullPointerException | if connection is null |
Definition at line 119 of file SQLitePragmas.java.
|
static |
Sets the synchronous mode on a connection.
This is a convenience method for setting synchronous mode specifically.
| connection | SQLite connection |
| mode | synchronous mode |
| SQLException | if the PRAGMA statement fails |
| NullPointerException | if connection or mode is null |
Definition at line 152 of file SQLitePragmas.java.
References dev.rafex.ether.database.sqlite.config.SynchronousMode.EXTRA, dev.rafex.ether.database.sqlite.config.SynchronousMode.FULL, dev.rafex.ether.database.sqlite.config.SynchronousMode.NORMAL, and dev.rafex.ether.database.sqlite.config.SynchronousMode.OFF.