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