# see: https://sqlite.org/cli.html
# enable column output mode with headers
# used for SELECT statements and makes them more readable
# .timer on
# .mode ascii|box|column
# .mode column
# .headers off
.headers on

.prompt "\nsqlite> " "> "

# display NULL value as "NULL".
# .nullvalue '<NULL>'
.nullvalue ∅'
# -- .width 100
# -- .changes on

# -- set the journal mode to Write-Ahead Logging for concurrency
# PRAGMA journal_mode = WAL;
# -- set synchronous mode to NORMAL for performance and data safety balance
# PRAGMA synchronous = NORMAL;
# -- set busy timeout to 5 seconds to avoid "database is locked" errors
# PRAGMA busy_timeout = 5000;
# -- set cache size to 20MB for faster data access
# PRAGMA cache_size = -20000;
# -- enable foreign key constraint enforcement
# PRAGMA foreign_keys = ON;
# -- enable auto vacuuming and incremental mode for gradual space reclaiming
# PRAGMA auto_vacuum = INCREMENTAL;
# -- store temporary tables and data in memory for better performance
# PRAGMA temp_store = MEMORY;
# -- set mmap_size to 2GB for faster read/write access using memory-mapped I/O
# PRAGMA mmap_size = 2147483648;
# -- set the page size to 8KB for balanced memory usage and performance
# PRAGMA page_size = 8192;
