skytracker.storage.tables.airport.AirportTableManager#
- class skytracker.storage.tables.airport.AirportTableManager(database: DatabaseManager)#
Bases:
TableManager[Airport]Async airport table manager
Properties
name of airport table
Methods
Initialize table manager by storing database manager
Ensure airport table exists
Get an airport by IATA code
Search for airports matching specific information
- __init__(database: DatabaseManager) None#
Initialize table manager by storing database manager
- Parameters:
database (DatabaseManager) – ClickHouse database manager
- async ensure_exists() None#
Ensure airport table exists
- async get_airport(iata: str) Airport#
Get an airport by IATA code
- Parameters:
iata (str) – airport IATA code
- Returns:
airport with specified IATA code
- Return type:
- async search_airport(fields: dict[str, Any], limit: int = 0) list[Airport]#
Search for airports matching specific information
- Parameters:
fields (dict[str, Any]) – field-value pairs to search for
limit (int, optional) – maximum number of airports to retrieve (0=all). Defaults to 0.
- Returns:
list of airports matching fields
- Return type:
list[Airport]
- TABLE_NAME = 'airport'#
name of airport table
- Type:
str