gatelogue_types.node.Node
- class gatelogue_types.node.Node(conn: sqlite3.Connection, i: int)
Bases:
objectBase class of all nodes
- __init__(conn: sqlite3.Connection, i: int)
Methods
__init__(conn, i)auto_type(conn, i)Automatically find and get the
Nodesubclass from the indexicreate_node(conn, src, *, ty)Internal use
delete()Internal use
Internal use
format_create_kwargs(**kwargs)Internal use
merge(other, warn_fn, object] =)Internal use
Attributes
Internal use
Returns a single source.
All sources that prove the node's existence.
The type of the node
The ID of the node
- COLUMNS: ClassVar[tuple[_Column | _FKColumn | _SetAttr | _CoordinatesColumn | _AircraftColumn, ...]] = ()
- STR2TYPE: ClassVar[dict] = {'AirAirline': <class 'gatelogue_types.air.AirAirline'>, 'AirAirport': <class 'gatelogue_types.air.AirAirport'>, 'AirFlight': <class 'gatelogue_types.air.AirFlight'>, 'AirGate': <class 'gatelogue_types.air.AirGate'>, 'BusBerth': <class 'gatelogue_types.bus.BusBerth'>, 'BusCompany': <class 'gatelogue_types.bus.BusCompany'>, 'BusConnection': <class 'gatelogue_types.bus.BusConnection'>, 'BusLine': <class 'gatelogue_types.bus.BusLine'>, 'BusStop': <class 'gatelogue_types.bus.BusStop'>, 'LocatedNode': <class 'gatelogue_types.node.LocatedNode'>, 'RailCompany': <class 'gatelogue_types.rail.RailCompany'>, 'RailConnection': <class 'gatelogue_types.rail.RailConnection'>, 'RailLine': <class 'gatelogue_types.rail.RailLine'>, 'RailPlatform': <class 'gatelogue_types.rail.RailPlatform'>, 'RailStation': <class 'gatelogue_types.rail.RailStation'>, 'SeaCompany': <class 'gatelogue_types.sea.SeaCompany'>, 'SeaConnection': <class 'gatelogue_types.sea.SeaConnection'>, 'SeaDock': <class 'gatelogue_types.sea.SeaDock'>, 'SeaLine': <class 'gatelogue_types.sea.SeaLine'>, 'SeaStop': <class 'gatelogue_types.sea.SeaStop'>, 'SpawnWarp': <class 'gatelogue_types.spawn_warp.SpawnWarp'>, 'Town': <class 'gatelogue_types.town.Town'>}
Internal use
- classmethod auto_type(conn: sqlite3.Connection, i: int) Node
Automatically find and get the
Nodesubclass from the indexi
- classmethod create_node(conn: sqlite3.Connection, src: int, *, ty: str) int
Internal use
- delete()
Internal use
- equivalent_nodes() Iterator[Self]
Internal use
- i
The ID of the node
- merge(other: Self, warn_fn: Callable[[str], object] = <built-in function warn>) set[int] | None
Internal use
- property source: int
Returns a single source. :exception AssertionError: if this node has more than one source, or if querying a non-source database.
- sources
All sources that prove the node’s existence. Does not exist in no-source databases.
- type
The type of the node