我们从Python开源项目中,提取了以下8个代码示例,用于说明如何使用sqlite3.sqlite_version()。
def get_summary(cls): """ Return a dictionary of information about this database backend. """ summary = { "DB-API version": "2.0", "Database SQL type": cls.__name__, "Database SQL module": "sqlite3", "Database SQL Python module version": sqlite3.version, "Database SQL module version": sqlite3.sqlite_version, "Database SQL module location": sqlite3.__file__, } return summary
def appDBDebugInfo(self): logger.debug("Sqlite database adapter version: %s" % sqlite3.sqlite_version)
def test_main(): if test.support.verbose: print("test_sqlite: testing with version", "{!r}, sqlite_version {!r}".format(sqlite3.version, sqlite3.sqlite_version)) test.support.run_unittest(dbapi.suite(), types.suite(), userfunctions.suite(), factory.suite(), transactions.suite(), hooks.suite(), regression.suite(), dump.suite())
def load_sqlite(self, force_sqlite_lib=None): """Load sqlite3/apsw library If no hints are given, it tries the apsw library then sqlite3. """ if force_sqlite_lib and force_sqlite_lib not in("sqlite3", "apsw"): raise USRESMonitorException( "Unknown SQLite library: {}. Must be sqlite3 or apsw".format( force_sqlite_lib ) ) def load_sqlite3(): import sqlite3 as sqlite_lib self.sqlite_lib = sqlite_lib self.sqlite_lib_name = "sqlite3" self.sqlite_version = sqlite_lib.sqlite_version def load_apsw(): import apsw as sqlite_lib self.sqlite_lib = sqlite_lib self.sqlite_lib_name = "apsw" self.sqlite_version = sqlite_lib.sqlitelibversion() if force_sqlite_lib == "sqlite3": load_sqlite3() elif force_sqlite_lib == "apsw": load_apsw() else: try: load_apsw() except: load_sqlite3()
def get_rdbms_metadata(self, cursor): import sqlite3 return RDBMSMetadata('SQLite', 'SQLite 3', sqlite3.sqlite_version)
def load_tests(*args): if test.support.verbose: print("test_sqlite: testing with version", "{!r}, sqlite_version {!r}".format(sqlite3.version, sqlite3.sqlite_version)) return unittest.TestSuite([dbapi.suite(), types.suite(), userfunctions.suite(), factory.suite(), transactions.suite(), hooks.suite(), regression.suite(), dump.suite()])