Beispiel #1
0
 def __init__(self, server_config):
     AbstractDatabaseEngineManager.__init__(self, server_config)
     sqlite_db_path = server_config.sqlite_db_path
     if sqlite_db_path is None:
         self.server_path = paths.get_opus_home_path('local_databases')
     else:
         self.server_path = sqlite_db_path
         
     self.schema_path = os.path.join(self.server_path, self._get_default_database())
     self.os = None
     try:
         self.os = os.uname[0]
     except:
         self.os = 'Windows'
Beispiel #2
0
 def __init__(self, sqlite_db_path = None):
     if sqlite_db_path is None:
         self.server_path = os.path.join(os.environ['OPUS_HOME'], 'local_databases')
     else:
         self.server_path = sqlite_db_path
         
     self.schema_path = os.path.join(self.server_path, self._get_default_database())
     self.os = None
     try:
         self.os = os.uname[0]
     except:
         self.os = 'Windows'
         
     AbstractDatabaseEngineManager.__init__(self)
Beispiel #3
0
 def get_tables_in_database(self, metadata):
     tables = AbstractDatabaseEngineManager.get_tables_in_database(self, metadata)
     # MSSQL hacking by Jesse
     # The three items in mssql_system_tables are tables (and views) created in
     # every MSSQL database.  A user should never need to cache or otherwise
     # work with these tables in OPUS (as far as I know), so I am filtering them 
     # out here.
     mssql_system_tables = [u'sysconstraints', u'dtproperties', u'syssegments']
     for i in mssql_system_tables:
         if i in tables:
             tables.remove(i)        
     return tables
Beispiel #4
0
 def get_tables_in_database(self, metadata):
     tables = AbstractDatabaseEngineManager.get_tables_in_database(
         self, metadata)
     # MSSQL hacking by Jesse
     # The three items in mssql_system_tables are tables (and views) created in
     # every MSSQL database.  A user should never need to cache or otherwise
     # work with these tables in OPUS (as far as I know), so I am filtering them
     # out here.
     mssql_system_tables = [
         u'sysconstraints', u'dtproperties', u'syssegments'
     ]
     for i in mssql_system_tables:
         if i in tables:
             tables.remove(i)
     return tables
Beispiel #5
0
 def __init__(self, server_config):
     AbstractDatabaseEngineManager.__init__(self, server_config)
     self.uses_schemas = True
Beispiel #6
0
 def get_tables_in_database(self, metadata):
     tables = AbstractDatabaseEngineManager.get_tables_in_database(self, metadata)
     tables = [t[t.find('.')+1:] for t in tables]
     return tables
Beispiel #7
0
 def __init__(self, server_config):
     AbstractDatabaseEngineManager.__init__(self, server_config)
Beispiel #8
0
 def get_tables_in_database(self, metadata):
     tables = AbstractDatabaseEngineManager.get_tables_in_database(
         self, metadata)
     tables = [t[t.find('.') + 1:] for t in tables]
     return tables
Beispiel #9
0
 def __init__(self, server_config):
     AbstractDatabaseEngineManager.__init__(self, server_config)