本文整理汇总了Python中sqlite3.sqlite_version方法的典型用法代码示例。如果您正苦于以下问题:Python sqlite3.sqlite_version方法的具体用法?Python sqlite3.sqlite_version怎么用?Python sqlite3.sqlite_version使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sqlite3
的用法示例。
在下文中一共展示了sqlite3.sqlite_version方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: analyze_db
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
def analyze_db():
conn = sqlite3.connect('WhatsappDB/msgstore.db')
cursor = conn.cursor()
rows=list()
print 'Module Version ',sqlite3.version
print 'Library Version ',sqlite3.sqlite_version
print ""
for row in cursor.execute('SELECT * FROM messages where edit_version=7 and key_from_me = 1 ORDER BY _id'):
row_date=str(row[7])
if len(row_date)>10:
row_date = row_date[:len(row_date)-3]
row_date=datetime.datetime.fromtimestamp(int(row_date)).strftime('%Y-%m-%d %H:%M:%S')
text = "Numero de telefono de whatsapp borrado [>] "+ str(str(row[1]).split("@")[0]) + "\nTimestamp [>] "+row_date
print text
rows.append(text)
cursor.close()
conn.close()
return rows
示例2: check7_sqlite3
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
def check7_sqlite3(self):
'''sqlite3
#TODO need to add to required section readme
https://stackoverflow.com/a/1546162
'''
self.append_text("\n")
# Start check
#SQLITE_MIN_VERSION = (0, 0, 0)
try:
import sqlite3
# sqlite3.version - pysqlite version
sqlite3_py_version_str = sqlite3.version
# sqlite3.sqlite_version - sqlite version
sqlite3_version_str = sqlite3.sqlite_version
except ImportError:
sqlite3_version_str = 'not found'
sqlite3_py_version_str = 'not found'
result = ("* SQLite Database library (sqlite3: " +
sqlite3_version_str + ") (Python-sqlite3: " +
sqlite3_py_version_str + ")")
# End check
self.append_text(result)
示例3: sys_info
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
def sys_info(cls):
"""Our information for `Coverage.sys_info`.
Returns a list of (key, value) pairs.
"""
with SqliteDb(":memory:", debug=NoDebugging()) as db:
temp_store = [row[0] for row in db.execute("pragma temp_store")]
compile_options = [row[0] for row in db.execute("pragma compile_options")]
return [
('sqlite3_version', sqlite3.version),
('sqlite3_sqlite_version', sqlite3.sqlite_version),
('sqlite3_temp_store', temp_store),
('sqlite3_compile_options', compile_options),
]
示例4: about
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
def about(self):
try:
import pulp
except ImportError:
pulp_version = "(missing!)"
else:
pulp_version = pulp.VERSION
try:
import sqlite3
except ImportError:
sqlite_version = "(missing!)"
else:
sqlite_version = sqlite3.sqlite_version
QMessageBox.information(None, "About", """
<h1>{}</h1>
<h3>Version {}</h3>
<p>© 2014-2016 Oleh Prypin <<a href="mailto:blaxpirit@gmail.com">blaxpirit@gmail.com</a>><br/>
© 2014 Stefan Walzer <<a href="mailto:sekti@gmx.net">sekti@gmx.net</a>></p>
<p>License: <a href="http://www.gnu.org/licenses/gpl.txt">GNU General Public License Version 3</a></p>
Using:
<ul>
<li>Python {}
<li>Qt {}
<li>{} {}
<li>PuLP {}
<li>SQLite {}
</ul>
""".format(
self.title, __version__,
sys.version.split(' ', 1)[0],
qt.version_str,
qt.module, qt.module_version_str,
pulp_version,
sqlite_version,
))
示例5: appDBDebugInfo
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
def appDBDebugInfo(self):
logger.debug("Sqlite database adapter version: %s" % sqlite3.sqlite_version)
示例6: get_summary
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
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
示例7: connect_db
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
def connect_db(self):
"""Connect to the database
Simply connect to the database at location <path>
"""
try:
logger.debug("connect db: %s", self.db)
self.con_db = sqlite3.connect(self.db)
self.cursor = self.con_db.cursor()
logger.debug(sqlite3.sqlite_version)
except Exception as e: # pylint: disable=broad-except
logger.debug(e)
示例8: load_tests
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
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()])
示例9: preloop
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
def preloop(self):
print('sqlite3 version %s' % sqlite3.sqlite_version)
print('.(dot) is used for all none sql commands.')
print('Use .help for non sqlite command list')
print('All sql commands must end with ;')
if self.database == ':memory:':
print('Using database :memory:\nuse .open ?file? to open a database')
else:
print('Using databasse: %s' % self.database)
示例10: check_runtime_requirements
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
def check_runtime_requirements():
if sqlite3.sqlite_version_info < (3, 9, 0):
raise RuntimeError("Need sqlite version >= 3.9.0, you have: %r" % (sqlite3.sqlite_version,))
示例11: _xray_traced_connect
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
def _xray_traced_connect(wrapped, instance, args, kwargs):
conn = wrapped(*args, **kwargs)
meta = {}
meta['name'] = args[0]
meta['database_version'] = sqlite3.sqlite_version
traced_conn = XRayTracedSQLite(conn, meta)
return traced_conn
示例12: load_tests
# 需要导入模块: import sqlite3 [as 别名]
# 或者: from sqlite3 import sqlite_version [as 别名]
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(),
backup.suite()])