8 SQLite Config
Anna Schumaker edited this page 2023-10-23 10:19:25 -04:00

Emmental configures SQLite by enabling foreign key constraint enforcement and setting the user version. The current user_version for Emmental 3.0 is 1.

Database Location

The database file is stored according to the XDG Base Directory Specification. The file is located at $XDG_DATA_HOME/emmental/emmental.sqlite3 for production and $XDG_DATA_HOME/emmental/emmental-debug.sqlite3 for debug builds.

Pragma

Pragma Value
foreign_keys ON
user_version 2

Custom Column Types

Name SQLite Type Python Type
PATH STRING pathlib.Path

Custom Functions

Custom functions are registered by Python at runtime, and are not available from the SQLite interpreter.

Name Description
CASEFOLD This is the Python str.casefold() function with an added None check