コード例 #1
0
 def checkversion(self, dbname):
     """Return the effective version of a database."""
     with sql.Updater(dbname, defs.get(dbname)) as updater:
         return updater._version
コード例 #2
0
 def __init__(self, dbname=None):
     if dbname is None:
         dbdefs = defs.getall()
         self.updaters = tuple(sql.Updater(k, dbdefs[k]) for k in dbdefs)
     else:
         self.updaters = (sql.Updater(dbname, defs.get(dbname)), )