CMS 3D CMS Logo

Classes | Functions | Variables
o2o_db_manager Namespace Reference

Classes

class  DbManager
 

Functions

def make_dbtype (base_class, schema=None)
 

Variables

 _Base = sqlalchemy.ext.declarative.declarative_base()
 
string coral_tpl = 'oracle://%s/%s'
 
list dev_db_service = ['cms_orcoff_prep', 'cms_orcoff_prep/cms_cond_general_w']
 
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

◆ make_dbtype()

def o2o_db_manager.make_dbtype (   base_class,
  schema = None 
)

Definition at line 16 of file o2o_db_manager.py.

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

Variable Documentation

◆ _Base

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

Definition at line 14 of file o2o_db_manager.py.

◆ coral_tpl

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

Definition at line 11 of file o2o_db_manager.py.

◆ dev_db_service

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

Definition at line 8 of file o2o_db_manager.py.

◆ private_db

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

Definition at line 12 of file o2o_db_manager.py.

◆ prod_db_service

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.

◆ schema_dict

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.

◆ sqlalchemy_tpl

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

Definition at line 10 of file o2o_db_manager.py.