"""
Contains settings and SQL statements for configuring SQLite3 database behavior.
This module provides the necessary SQL commands to enable certain features
and optimize SQLite3 database operations, particularly using PRAGMA statements.
The focus includes enabling foreign key constraints and configuring the database
for Write-Ahead Logging (WAL) mode. It also includes settings for synchronous
operation and timeout duration for database connections.
"""
[docs]
class Pragma:
"""pragma settings for sqlite3 database"""
[docs]
FOREIGN_KEYS_ON: str = "PRAGMA foreign_keys = ON"
[docs]
JOURNAL_MODE_WAL: str = "PRAGMA journal_mode = WAL"
[docs]
SYNCHRONOUS_NORMAL: str = "PRAGMA synchronous = NORMAL"
[docs]
BUSY_TIMEOUT_30_SEC: str = "PRAGMA busy_timeout = 30000"