skytracker.storage.tables.airport.AirportTableManager#

class skytracker.storage.tables.airport.AirportTableManager(database: DatabaseManager)#

Bases: TableManager[Airport]

Async airport table manager

Properties

TABLE_NAME

name of airport table

Methods

__init__

Initialize table manager by storing database manager

ensure_exists

Ensure airport table exists

get_airport

Get an airport by IATA code

search_airport

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:

Airport

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