Sql2Instrument
This module contains all operations for reading an Instrument object from the database and dumping it to a file or giving it to a user as a object.
Functions and Classes
-
getAllInstruments(db_conn=None)
Function for fetching all instruments from the database and returning them to the user.
| Parameters: | db_conn (psycopg2.connection) – connection object to the database |
| Returns: | list of Instrument object |
-
getInstrument(instrument_id, db_conn=None)
Function for fetching an instrument from the database and returning it to the user.
| Parameters: |
- instrument_id (int) – id of the instrumnent wanted
- db_conn (psycopg2.connection) – connection object to the database
|
| Returns: | Instrument object
|
-
instruments2sensors(sensors, db_conn=None)
Function for fetching all instrument data related to sensors to a list of sensor objects.
| Parameters: |
- sensor (list) – list of sensors
- db_conn (psycopg2.connection) – connection object to the database
|