uls_query/lib.rs
1//! Query engine for FCC ULS data lookups.
2//!
3//! This crate provides a high-level API for querying ULS license data.
4//! It wraps the database operations and provides convenient search and
5//! lookup methods with filtering and formatting support.
6//!
7//! # Example
8//!
9//! ```no_run
10//! use uls_query::{QueryEngine, SearchFilter};
11//!
12//! fn main() -> Result<(), Box<dyn std::error::Error>> {
13//! let engine = QueryEngine::open("~/.uls/uls.db")?;
14//!
15//! // Quick callsign lookup
16//! if let Some(license) = engine.lookup("W1AW")? {
17//! println!("{} - {}", license.call_sign, license.display_name());
18//! }
19//!
20//! // Search by name
21//! let results = engine.search(SearchFilter::name("SMITH"))?;
22//! for license in results {
23//! println!("{}", license.call_sign);
24//! }
25//!
26//! Ok(())
27//! }
28//! ```
29
30mod engine;
31mod fields;
32mod filter;
33mod output;
34
35pub use engine::{QueryEngine, QueryError};
36pub use fields::{FieldDef, FieldRegistry, FieldType, FilterExpr, FilterOp};
37pub use filter::{SearchFilter, SortOrder};
38pub use output::{FormatOutput, OutputFormat};
39pub use uls_db::models::{License, LicenseStats};