ConnectTool
 All Classes Namespaces Files Functions Variables Pages
Classes | Namespaces | Functions | Variables
module_db.py File Reference

Classes

class  module_db.DBError
 Error returned by module_db. More...
 

Namespaces

 module_db
 

Functions

def module_db.row2dict
 Classic SQLite routine for transforming a row of tuple into a dictionnary. More...
 
def module_db.open_db
 Connect to Output DB. More...
 
def module_db.column_list
 Compute list of all db columns. More...
 
def module_db.init_db
 Initialise output database file. More...
 
def module_db.print_element
 Print a database element in a string. More...
 
def module_db.print_optional_argument
 Print some optional arguments of add/update/find_element. More...
 
def module_db.print_database
 Print the entire table as a list of strings. More...
 
def module_db.find_element
 Find an element in a table. More...
 
def module_db.datetime2output
 Look for the corresponding output around a given date (depending on h_accuracy). More...
 
def module_db.add_element
 Add an element in a table. More...
 
def module_db.update_element
 Update an element in a table through its ID. More...
 
def module_db.reinit_element
 Put a row to the default values. More...
 
def module_db.delete_element
 Delete an element in a table through its ID. More...
 
def module_db.build_db
 Build the Output database for all simulations available. More...
 

Variables

tuple module_db.database_path = os.path.join('dir.output','output.db')
 
string module_db.database_table = 'simulation'
 
dictionary module_db.operation_mode_ids = {'SCIENCE': 0, 'FORECAST': 1, 'EXTENDED': 2}