Expand description
Query engine for FCC ULS data lookups.
This crate provides a high-level API for querying ULS license data. It wraps the database operations and provides convenient search and lookup methods with filtering and formatting support.
§Example
use uls_query::{QueryEngine, SearchFilter};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let engine = QueryEngine::open("~/.uls/uls.db")?;
// Quick callsign lookup
if let Some(license) = engine.lookup("W1AW")? {
println!("{} - {}", license.call_sign, license.display_name());
}
// Search by name
let results = engine.search(SearchFilter::name("SMITH"))?;
for license in results {
println!("{}", license.call_sign);
}
Ok(())
}Structs§
- Field
Def - Field definition with SQL column mapping.
- Field
Registry - Registry of all searchable/sortable fields.
- Filter
Expr - A single filter expression: field op value.
- License
- A complete license with all related information.
- License
Stats - Database statistics.
- Query
Engine - Query engine for ULS data.
- Search
Filter - Filter criteria for license searches.
Enums§
- Field
Type - Field data types that determine allowed filter operations.
- Filter
Op - Comparison operators for filters.
- Output
Format - Supported output formats.
- Query
Error - Errors from query operations.
- Sort
Order - Sort order for search results.
Traits§
- Format
Output - Trait for formatting output.