Exemple #1
0
 def closeMySql(self, scode):
     MultiDbManager.instance().delMySql(scode)
Exemple #2
0
 def createTables(self, scode):
     for table in self.databaseMaker.tableQueries:
         MultiDbManager.instance().nonSelect(scode, table)
Exemple #3
0
 def hasScode(self, scode):
     return MultiDbManager.instance().hasScode(scode)
Exemple #4
0
 def initMySqlWithDatabase(self, scode, host, port, user, passwd, dbname):
     return MultiDbManager.instance().addMySql(scode, host, port, user,
                                               passwd, dbname, self)
Exemple #5
0
 def execute(self, scode, sql, params):
     return MultiDbManager.instance().execute(scode, sql, params)
Exemple #6
0
 def selectOne(self, scode, sql):
     result = MultiDbManager.instance().select(scode, sql)
     if result is None:
         return None
     return result[0]
Exemple #7
0
 def delete(self, scode, sql):
     return MultiDbManager.instance().update(scode, sql)
Exemple #8
0
 def insert(self, scode, sql):
     return MultiDbManager.instance().insert(scode, sql)
Exemple #9
0
 def select(self, scode, sql):
     return MultiDbManager.instance().select(scode, sql)
Exemple #10
0
 def count(self, scode, sql):
     return len(MultiDbManager.instance().select(scode, sql))
Exemple #11
0
 def multiQueries(self, scode, queries):
     return MultiDbManager.instance().multiQueries(scode, queries)
Exemple #12
0
 def upsertQueries(self, scode, queries):
     return MultiDbManager.instance().insertQueries(scode, queries)
Exemple #13
0
 def updateQuery(self, scode, sql):
     return MultiDbManager.instance().update(scode, sql)