Skip to main content

Module sqlite

Module sqlite 

Source
Expand description

SQLite backend: schema, pragmas, and migrations.

Structs§

AgentArchivePurgeResult
Result of purging archived data for a single agent.
AnalyticsRebuildResult
Result of an analytics rebuild operation.
AnalyticsRollupAggregator
In-memory aggregator for batched usage_hourly and usage_daily rollup updates.
ConnectionManagerConfig
Configuration for the FrankenConnectionManager.
DailyCount
Daily count data for histogram display.
DailyStatsHealth
Health status of daily stats table.
DailyStatsRebuildResult
Result of rebuilding daily stats.
DatabaseBundleMoveResult
EmbeddingJobRow
Row from the embedding_jobs table.
FrankenConnectionManager
Multi-connection manager for frankensqlite.
FrankenStorage
Primary frankensqlite-backed storage backend.
FtsEntry
Entry for pending FTS5 insert.
HistoricalSalvageOutcome
IndexingCache
Cache for agent and workspace IDs during batch indexing.
InsertOutcome
LazyFrankenDb
Lazy-opening wrapper for FrankenConnection (frankensqlite).
LazyFrankenDbGuard
RAII guard that dereferences to the inner FrankenConnection.
LexicalRebuildConversationFootprintRow
Lightweight per-conversation footprint used to pre-plan lexical rebuild shard boundaries without re-reading full message bodies in the hot path.
LexicalRebuildConversationRow
Lightweight conversation projection used while rebuilding the lexical index.
LexicalRebuildGroupedMessageRow
Even lighter message projection used only by the grouped lexical rebuild stream hot path. It keeps just the per-message fields the rebuild consumes and tracks the final message id at conversation scope instead.
LexicalRebuildMessageRow
Lightweight message projection used by the streaming lexical rebuild path.
MessageForEmbedding
Message data needed for semantic embedding generation.
MessageMetricsEntry
Pending message_metrics row for batch insertion.
PricingDiagnostics
Diagnostics for pricing coverage during a batch operation.
PricingEntry
One pricing row loaded from the model_pricing table.
PricingTable
In-memory pricing table loaded from model_pricing for fast lookups.
SendFrankenConnection
Wrapper around FrankenConnection that implements Send.
StatsAggregator
In-memory aggregator for batched daily stats updates.
StatsDelta
Accumulated statistics delta for a single (day_id, agent, source) combination.
TokenStatsAggregator
In-memory aggregator for batched token daily stats updates.
TokenStatsDelta
Accumulated token statistics delta for a single (day_id, agent, source, model_family) combination.
TokenUsageEntry
Pending token_usage row to be batch-inserted.
UsageRollupDelta
Delta for a single (bucket, agent_slug, workspace_id, source_id) rollup key.
WriterGuard
RAII guard for a writer connection.

Enums§

LazyDbError
Error from lazy database initialization.
MigrationError
Error type for schema migration operations.
SchemaCheck
Result of checking schema compatibility.

Constants§

CURRENT_SCHEMA_VERSION
Public schema version constant for external checks.
FTS5_DELETE_ALL_SQL
SQL to clear all rows from the contentless fts_messages table.
FTS5_REGISTER_SQL
SQL to register the FTS5 virtual table on a frankensqlite connection.

Traits§

IndexingCacheStorage

Functions§

cleanup_old_backups
Remove old backup files, keeping only the most recent keep_count.
create_backup
Create a uniquely named backup of the database file.
is_user_data_file
Check if a file is user-authored data that must be preserved during rebuild.

Type Aliases§

LexicalRebuildGroupedMessageRows
SqliteStorage
Compatibility alias retained while call sites finish converging on FrankenStorage.