IBaseStationDatabase Interface |
Namespace: VirtualRadar.Interface.Database
The IBaseStationDatabase type exposes the following members.
Name | Description | |
---|---|---|
FileName |
Gets or sets the full path and filename of the database. Changing the filename causes the current connection
to close, the next operation on the database causes it to open a new connection as per usual.
| |
IsConnected |
Gets a value indicating that there is an open connection to the database.
| |
LogFileName |
Gets or sets the full path and filename of the log.
| |
MaxParameters |
Gets the maximum number of parameters that can be passed to the underlying database engine. Note that calls that
accept a variable number of parameters will automatically handle splitting the call into multiple calls on the
database unless otherwise noted.
| |
Provider |
Gets or sets the object that abstracts away the environment to help when testing.
| |
WriteSupportEnabled |
Gets or sets a flag indicating that methods that can create or modify the database are enabled. By default
this setting is disabled. Changing this setting closes the current connection, the next call to access the
database will reopen it.
|
Name | Description | |
---|---|---|
AttemptAutoFix |
Takes an exception that was thrown from TestConnection and attempts to correct the error that
was encountered. If it's likely to have succeeded then returns true.
| |
CreateDatabaseIfMissing |
If the database file is missing or entirely empty then this method creates the file and pre-populates the
tables with roughly the same records that BaseStation prepopulates a new database with.
| |
DeleteAircraft |
Deletes an existing aircraft record.
| |
DeleteFlight |
Deletes an existing flight record. Ignores the aircraft record attached to the flight (if any).
| |
DeleteLocation |
Deletes an existing location record.
| |
DeleteSession |
Deletes the record for a session. This automatically deletes all flights associated with the session.
| |
DeleteSystemEvent |
Deletes an existing SystemEvents record.
| |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.) | |
EndTransaction |
Ends a transaction. Ending a nested transaction has no effect.
(Inherited from ITransactionable.) | |
GetAircraftByCode |
Returns the first aircraft with the ICAO24 code passed across.
| |
GetAircraftById |
Retrieves an aircraft record by its identifier.
| |
GetAircraftByRegistration |
Returns the first aircraft with the registration passed across.
| |
GetAllAircraft |
Returns every aircraft record in the database.
| |
GetCountOfFlights |
Returns the number of flights that match the criteria passed across.
| |
GetCountOfFlightsForAircraft |
Returns the number of flight records that match the criteria passed across.
| |
GetDatabaseHistory |
Returns all of the records from BaseStation's DBHistory table.
| |
GetDatabaseVersion |
Returns the single DBInfo record in BaseStation's DBInfo table. Note that this has no key.
| |
GetFlightById |
Retrieves a flight record from the database by its ID number. This does not read the associated aircraft record.
| |
GetFlights |
Returns all flights, or a subset of all flights, that match the criteria passed across.
| |
GetFlightsForAircraft |
Returns a list of every flight, or a subset of every flight, that matches the criteria passed across.
| |
GetLocations |
Returns all of the locations from BaseStation's Locations table.
| |
GetManyAircraftAndFlightsCountByCode |
Returns aircraft records and counts of flights for many ICAO24 codes simultaneously.
| |
GetManyAircraftByCode |
Returns aircraft records for many ICAO24 codes simultaneously.
| |
GetOrInsertAircraftByCode |
Fetches an aircraft by its ICAO code. If there is no record for the aircraft then the createNewAircraftFunc
method is called to build a new record, and that is inserted.
| |
GetSessions |
Returns all of the sessions from BaseStation's Sessions table.
| |
GetSystemEvents |
Returns the entire content of the SystemEvents table.
| |
InsertAircraft |
Inserts a new aircraft record and fills AircraftID with the identifier of the record.
| |
InsertFlight |
Inserts a new flight record and assigns the unique identifier of the new record to the FlightID property. The AircraftID
property must be filled with the identifier of an existing aircraft record.
| |
InsertLocation |
Inserts a new record in the database for the location passed across and sets the LocationID to the
identifier of the new record.
| |
InsertSession |
Inserts a record in the Sessions table, setting SessionID to the identifier of the new record.
| |
InsertSystemEvent |
Inserts a new SystemEvents record and sets the SystemEventsID to the identifier of the new record.
| |
RecordManyMissingAircraft |
Does the same as RecordMissingAircraft(String) but for many ICAOs simultaneously.
| |
RecordMissingAircraft |
Records a missing aircraft record.
| |
RollbackTransaction |
Rolls back a transaction. Rolling back a nested transaction rolls back all transactions.
(Inherited from ITransactionable.) | |
StartTransaction |
Begins a new transaction. Nesting transactions is allowed.
(Inherited from ITransactionable.) | |
TestConnection |
Returns true if a connection could be made to FileName, false if it could not.
If it could be made then the connection is left open.
| |
UpdateAircraft |
Updates an existing aircraft record.
| |
UpdateAircraftModeSCountry |
Updates the Mode-S country for an aircraft.
| |
UpdateFlight |
Updates an existing flight record. Ignores the aircraft record attached to the flight (if any).
| |
UpdateLocation |
Updates an existing location record.
| |
UpdateSession |
Updates the record for a session.
| |
UpdateSystemEvent |
Updates an existing SystemEvents record.
| |
UpsertAircraftByCode |
Creates or updates an aircraft record.
| |
UpsertManyAircraftByCodes |
Does the same as UpsertAircraftByCode(String, FuncBaseStationAircraft, BaseStationAircraft) but for many ICAOs.
|
Name | Description | |
---|---|---|
AircraftUpdated |
Raised after an aircraft has been updated.
| |
FileNameChanged |
Raised after FileName has changed as the result of a configuration change.
| |
FileNameChanging |
Raised before FileName is changed as the result of a configuration change.
|
The BaseStation database is an SQLite file that Kinetic's BaseStation application creates and maintains. By default the object implementing the interface is in read-only mode, it will not make any changes to the database. In this mode attempts to use the insert / update or delete methods should throw an InvalidOperation exception. If the program sets WriteSupportEnabled then the insert / update and delete methods should allow writes to the database.
Virtual Radar Server never sets WriteSupportEnabled, it will never write to the database. The write methods are only there for the use of plugins.