Skip to main content

Module db

Module db 

Source
Expand description

SQLite database for caching scan and build results.

This module provides optimized database access with:

  • Lazy loading to minimize memory usage
  • Indexed reverse dependency lookups for fast failure cascades
  • Normalized dependency tables for efficient queries
  • Hybrid storage: columns for hot fields, JSON for cold data

§Schema

  • packages - Core package identity and status
  • depends - Raw dependency patterns from scans
  • resolved_depends - Resolved dependencies after pattern matching
  • builds - Build results with indexed outcome
  • metadata - Key-value store for flags and cached data

Structs§

BuildDiff
Categorised differences between two builds.
BuildListEntry
Summary of a build session from history.
Database
SQLite database for scan, build, and history data.
DiffEntry
A single entry in a build diff.
PackageRow
Lightweight package row without full scan data.
PackageStatusRow
Package data combined with build status.
PkgBuildHistory
Summary of a package’s most recent build from history.
TransactionGuard
RAII transaction guard that rolls back on drop unless committed.

Type Aliases§

ReportRow
Row type for Database::get_report_data: (pkgname, pkgpath, scan_data_json, outcome_id, outcome_detail).