Ether Framework
Unified API docs for Ether modules
Loading...
Searching...
No Matches
dev.rafex.ether.database.sqlite.config.SQLitePragmas Class Reference

Utility to apply SQLite PRAGMA settings to a connection. More...

Collaboration diagram for dev.rafex.ether.database.sqlite.config.SQLitePragmas:

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.

Detailed Description

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.

Member Function Documentation

◆ apply()

void dev.rafex.ether.database.sqlite.config.SQLitePragmas.apply ( Connection connection,
SQLiteConfig config ) throws SQLException
static

Applies configuration to a SQLite connection.

Executes the necessary PRAGMA statements to configure the connection according to the provided configuration.

Parameters
connectionSQLite connection
configconfiguration to apply
Exceptions
SQLExceptionif any PRAGMA statement fails
NullPointerExceptionif 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().

Here is the caller graph for this function:

◆ applyDefaults()

void dev.rafex.ether.database.sqlite.config.SQLitePragmas.applyDefaults ( Connection connection) throws SQLException
static

Applies default configuration to a SQLite connection.

Equivalent to apply(connection, SQLiteConfig.defaults()).

Parameters
connectionSQLite connection
Exceptions
SQLExceptionif any PRAGMA statement fails
NullPointerExceptionif connection is null

Definition at line 106 of file SQLitePragmas.java.

References apply(), and dev.rafex.ether.database.sqlite.config.SQLiteConfig.defaults().

Here is the call graph for this function:

◆ disableWal()

void dev.rafex.ether.database.sqlite.config.SQLitePragmas.disableWal ( Connection connection) throws SQLException
static

Disables Write-Ahead Logging (WAL) mode on a connection.

This is a convenience method for disabling WAL mode specifically.

Parameters
connectionSQLite connection
Exceptions
SQLExceptionif the PRAGMA statement fails
NullPointerExceptionif connection is null

Definition at line 135 of file SQLitePragmas.java.

◆ enableWal()

void dev.rafex.ether.database.sqlite.config.SQLitePragmas.enableWal ( Connection connection) throws SQLException
static

Enables Write-Ahead Logging (WAL) mode on a connection.

This is a convenience method for enabling WAL mode specifically.

Parameters
connectionSQLite connection
Exceptions
SQLExceptionif the PRAGMA statement fails
NullPointerExceptionif connection is null

Definition at line 119 of file SQLitePragmas.java.

◆ setSynchronousMode()

void dev.rafex.ether.database.sqlite.config.SQLitePragmas.setSynchronousMode ( Connection connection,
SynchronousMode mode ) throws SQLException
static

Sets the synchronous mode on a connection.

This is a convenience method for setting synchronous mode specifically.

Parameters
connectionSQLite connection
modesynchronous mode
Exceptions
SQLExceptionif the PRAGMA statement fails
NullPointerExceptionif 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.


The documentation for this class was generated from the following file:
  • ether-database-sqlite/ether-database-sqlite/src/main/java/dev/rafex/ether/database/sqlite/config/SQLitePragmas.java