Skip to main content

Module db

Module db 

Source
Expand description

Persistent storage for modde, backed by SQLite (default) or PostgreSQL.

The public ModdeDb API is identical across both backends and async throughout. Each method is written once against the internal Db executor using portable SQL (? placeholders, RETURNING id, ON CONFLICT … DO UPDATE … EXCLUDED, lower(name), bool columns, and a {NOW} token); the executor rewrites placeholders/now() per dialect. The only genuinely per-backend code is schema creation and migration.

Structs§

ExecutableConfigRow
A named executable launch target for a game.
HiddenFile
A hidden file entry — prevents a specific file from a mod from being deployed.
ModCategory
A mod category for organizing the mod list.
ModdeDb
SQLite/PostgreSQL-backed persistent storage for modde.
PluginEntry
A plugin entry in the plugin load order (independent of mod install priority).
ProfileSummary
Summary view of a profile (without loading all mods).
SaveEntry
A save file/directory assigned to a profile.
SnapshotMeta
Metadata for a stock game snapshot stored in the database.
ToolAppliedFileRow
A file applied by a tool to a game directory.
ToolConfigRow
Per-game tool configuration stored in the database.
ToolSettingHistoryEdge
One parent-child edge in the per-tool settings DAG.
ToolSettingHistoryNode
One versioned tool settings node in the per-tool DAG.

Enums§

Val
A backend-agnostic bound parameter.

Functions§

build_pg_options
Build resolved PostgreSQL connection options from settings plus env.
decode_install_method
Parse the TOML-encoded install_method column back into a typed InstallMethod. Returns None for NULL / empty strings.
describe_pg_options