Skip to main content

uls_db/
lib.rs

1//! SQLite database layer for FCC ULS data storage.
2//!
3//! This crate provides functionality to store and query FCC ULS data in a
4//! SQLite database. It supports both full database builds from weekly files
5//! and incremental updates from daily transaction files.
6//!
7//! # Example
8//!
9//! ```no_run
10//! use uls_db::{Database, DatabaseConfig};
11//!
12//! fn main() -> Result<(), Box<dyn std::error::Error>> {
13//!     let db = Database::open("uls.db")?;
14//!     
15//!     // Look up a callsign
16//!     if let Some(license) = db.get_license_by_callsign("W1AW")? {
17//!         println!("Found: {} - {}", license.call_sign, license.licensee_name);
18//!     }
19//!     
20//!     Ok(())
21//! }
22//! ```
23
24pub mod bulk_inserter;
25pub mod config;
26pub mod enum_adapters;
27pub mod error;
28pub mod freshness;
29pub mod importer;
30pub mod models;
31pub mod repository;
32pub mod schema;
33
34pub use bulk_inserter::BulkInserter;
35pub use config::DatabaseConfig;
36pub use error::{DbError, Result};
37pub use freshness::{AppliedPatch, DataFreshness, StalenessConfig, DEFAULT_STALE_THRESHOLD_DAYS};
38pub use importer::{ImportMode, ImportProgress, ImportStats, Importer};
39pub use models::{License, LicenseStats, Operator};
40pub use repository::{Database, Transaction};
41pub use schema::Schema;