Skip to main content

Module db

Module db 

Source
Expand description

Database module for Smriti

Uses SQLite with the database stored on the indexed drive itself, making the index fully portable.

Re-exports§

pub use album_repo::AlbumRecord;
pub use album_repo::AlbumRepo;
pub use album_suggestion_repo::AlbumSuggestionRecord;
pub use album_suggestion_repo::AlbumSuggestionRepo;
pub use burst_repo::BurstGroupMemberRecord;
pub use burst_repo::BurstGroupRecord;
pub use burst_repo::BurstRepo;
pub use connection::db_path_for;
pub use connection::open_secondary;
pub use connection::tile_cache_dir;
pub use connection::Database;
pub use document_repo::DocumentRepo;
pub use duplicate_repo::DuplicateGroupMemberRecord;
pub use duplicate_repo::DuplicateGroupRecord;
pub use duplicate_repo::DuplicateRepo;
pub use excluded_folder_repo::ExcludedFolderRecord;
pub use excluded_folder_repo::ExcludedFolderRepo;
pub use face_repo::FaceClusterRecord;
pub use face_repo::FaceDetail;
pub use face_repo::FaceRepo;
pub use face_repo::FaceStatus;
pub use face_repo::ReviewItem;
pub use inferred_identity_repo::InferredIdentityRepo;
pub use photo_repo::PhotoRepo;
pub use recent_search_repo::RecentSearch;
pub use recent_search_repo::RecentSearchRepo;
pub use schema::create_schema;
pub use stack_repo::PhotoStackMemberRecord;
pub use stack_repo::PhotoStackRecord;
pub use stack_repo::PhotoStackRepo;
pub use stack_repo::StackCandidate;
pub use takeout_import_repo::TakeoutImportRepo;
pub use takeout_import_repo::TakeoutLedgerItem;
pub use trash_repo::TrashRepo;
pub use trash_repo::TrashedPhotoRecord;

Modules§

album_repo
Album database operations
album_suggestion_repo
Album suggestion database operations
burst_repo
Burst groups database operations
connection
Database connection management
document_repo
Document repository
duplicate_repo
Duplicate groups database operations
excluded_folder_repo
Per-library folder exclusions.
face_repo
Face database repository
geonames
GeoNames database access helpers.
inferred_identity_repo
Inferred identity repository
migrations
Database migrations for schema versioning
photo_repo
Photo database repository
recent_search_repo
Recent searches persistence (per-library history).
schema
Database schema creation
stack_repo
Photo stack persistence.
takeout_import_repo
Durable bookkeeping for Google Photos Takeout imports.
trash_repo
Trash database operations.

Constants§

LIBRARY_METADATA_DIR
Per-drive metadata folder. Kept as .photovault for backwards compatibility with libraries indexed before the Smriti rename — renaming would orphan every user’s existing thumbnails / db / face crops on disk. Treat the on-disk folder name as part of the wire contract; new code reads this constant rather than the literal so the link to the legacy name stays explicit.
MAX_ROWS_PER_INSERT
Maximum rows per multi-row INSERT statement. SQLite’s default SQLITE_MAX_VARIABLE_NUMBER is 999 in older builds and 32766 in newer ones; staying at 200 rows per chunk keeps every existing repo (which never exceeds 5 columns per row) well under either limit, while still giving a ~3× speedup vs. one INSERT per row.