All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Variables
convertcalibPostGresToSQLite Namespace Reference

Variables

list calibs
 
list suffixes = ['tags', 'iovs', 'tag_iovs', 'data']
 
string host = 'Icarus-db'
 
string db = 'icarus_online_prd'
 
string user = 'calib_admin'
 
string port = '5434'
 
string pw = 'calib4adm'
 
tuple conn = psycopg2.connect(host=host, port=port, dbname=db, user=user, password=pw)
 
tuple cur = conn.cursor()
 
string sqlite_database = '%s.db'
 
tuple sqlite_conn = sqlite3.connect(sqlite_database)
 
tuple sqlite_cur = sqlite_conn.cursor()
 
dictionary schema = {}
 
string table_name = '%s_%s'
 
string qtbl = 'CREATE TABLE IF NOT EXISTS %s ('
 
string q = 'select column_name, data_type, is_nullable from information_schema.columns where table_name=%s'
 
tuple rows = cur.fetchall()
 
 first = True
 
list column_name = row[0]
 
list data_type = row[1]
 
list null = row[2]
 
string sqlite_type = ''
 
int max_iov_id = 0
 
tuple row = cur.fetchone()
 
tuple now = datetime.datetime.now()
 
string qval = 'VALUES('
 
list values = []
 
int n = 0
 
list element = row[n]
 

Variable Documentation

list convertcalibPostGresToSQLite.calibs
Initial value:
1 = [
2 'crt_gain_reco_data',
3 ]

Definition at line 8 of file convertcalibPostGresToSQLite.py.

list convertcalibPostGresToSQLite.column_name = row[0]

Definition at line 66 of file convertcalibPostGresToSQLite.py.

tuple convertcalibPostGresToSQLite.conn = psycopg2.connect(host=host, port=port, dbname=db, user=user, password=pw)

Definition at line 24 of file convertcalibPostGresToSQLite.py.

tuple convertcalibPostGresToSQLite.cur = conn.cursor()

Definition at line 25 of file convertcalibPostGresToSQLite.py.

list convertcalibPostGresToSQLite.data_type = row[1]

Definition at line 67 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.db = 'icarus_online_prd'

Definition at line 19 of file convertcalibPostGresToSQLite.py.

list convertcalibPostGresToSQLite.element = row[n]

Definition at line 169 of file convertcalibPostGresToSQLite.py.

convertcalibPostGresToSQLite.first = True

Definition at line 64 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.host = 'Icarus-db'

Definition at line 18 of file convertcalibPostGresToSQLite.py.

list convertcalibPostGresToSQLite.max_iov_id = 0

Definition at line 124 of file convertcalibPostGresToSQLite.py.

int convertcalibPostGresToSQLite.n = 0

Definition at line 167 of file convertcalibPostGresToSQLite.py.

tuple convertcalibPostGresToSQLite.now = datetime.datetime.now()

Definition at line 159 of file convertcalibPostGresToSQLite.py.

list convertcalibPostGresToSQLite.null = row[2]

Definition at line 68 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.port = '5434'

Definition at line 21 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.pw = 'calib4adm'

Definition at line 22 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.q = 'select column_name, data_type, is_nullable from information_schema.columns where table_name=%s'

Definition at line 61 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.qtbl = 'CREATE TABLE IF NOT EXISTS %s ('

Definition at line 57 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.qval = 'VALUES('

Definition at line 165 of file convertcalibPostGresToSQLite.py.

tuple convertcalibPostGresToSQLite.row = cur.fetchone()

Definition at line 128 of file convertcalibPostGresToSQLite.py.

tuple convertcalibPostGresToSQLite.rows = cur.fetchall()

Definition at line 63 of file convertcalibPostGresToSQLite.py.

dictionary convertcalibPostGresToSQLite.schema = {}

Definition at line 43 of file convertcalibPostGresToSQLite.py.

tuple convertcalibPostGresToSQLite.sqlite_conn = sqlite3.connect(sqlite_database)

Definition at line 38 of file convertcalibPostGresToSQLite.py.

tuple convertcalibPostGresToSQLite.sqlite_cur = sqlite_conn.cursor()

Definition at line 39 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.sqlite_database = '%s.db'

Definition at line 35 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.sqlite_type = ''

Definition at line 77 of file convertcalibPostGresToSQLite.py.

list convertcalibPostGresToSQLite.suffixes = ['tags', 'iovs', 'tag_iovs', 'data']

Definition at line 14 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.table_name = '%s_%s'

Definition at line 51 of file convertcalibPostGresToSQLite.py.

string convertcalibPostGresToSQLite.user = 'calib_admin'

Definition at line 20 of file convertcalibPostGresToSQLite.py.

list convertcalibPostGresToSQLite.values = []

Definition at line 166 of file convertcalibPostGresToSQLite.py.