CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions | Variables
o2o_db_manager Namespace Reference

Classes

class  DbManager
 

Functions

def make_dbtype
 

Variables

tuple _Base = sqlalchemy.ext.declarative.declarative_base()
 
string coral_tpl = 'oracle://%s/%s'
 
list dev_db_service = ['cms_orcoff_prep', 'cms_orcoff_prep/cms_test_conditions']
 
string private_db = 'sqlite:///post_o2o.db'
 
list prod_db_service = ['cms_orcon_prod', 'cms_orcon_prod/cms_cond_general_w']
 
dictionary schema_dict = {'cms_orcon_prod':'cms_cond_o2o', 'cms_orcoff_prep':'cms_cond_strip'}
 
string sqlalchemy_tpl = 'oracle://%s:%s@%s'
 

Function Documentation

def o2o_db_manager.make_dbtype (   base_class,
  schema = None 
)

Definition at line 16 of file o2o_db_manager.py.

16 
17 def make_dbtype(base_class, schema=None):
18  import re
19  name = re.sub('Def$', '', base_class.__name__)
20  members = {}
21  members['__tablename__'] = base_class.__tablename__
22  members['__table_args__'] = None
23  if schema:
24  name = name + schema
25  members['__table_args__'] = {'schema' : schema}
26  dbType = type(name, (_Base, base_class), members)
27  return dbType
28 

Variable Documentation

tuple o2o_db_manager._Base = sqlalchemy.ext.declarative.declarative_base()

Definition at line 14 of file o2o_db_manager.py.

string o2o_db_manager.coral_tpl = 'oracle://%s/%s'

Definition at line 11 of file o2o_db_manager.py.

list o2o_db_manager.dev_db_service = ['cms_orcoff_prep', 'cms_orcoff_prep/cms_test_conditions']

Definition at line 8 of file o2o_db_manager.py.

string o2o_db_manager.private_db = 'sqlite:///post_o2o.db'

Definition at line 12 of file o2o_db_manager.py.

list o2o_db_manager.prod_db_service = ['cms_orcon_prod', 'cms_orcon_prod/cms_cond_general_w']

Definition at line 7 of file o2o_db_manager.py.

dictionary o2o_db_manager.schema_dict = {'cms_orcon_prod':'cms_cond_o2o', 'cms_orcoff_prep':'cms_cond_strip'}

Definition at line 9 of file o2o_db_manager.py.

string o2o_db_manager.sqlalchemy_tpl = 'oracle://%s:%s@%s'

Definition at line 10 of file o2o_db_manager.py.