添加了支持MySQL数据库的测试代码

This commit is contained in:
MarkusJoe
2022-02-26 13:51:29 +08:00
parent 7ee0cda42e
commit ffbd9344a9
6 files changed
+601 -215

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
# -- coding:utf-8 --
# @Author: markushammered@gmail.com
# @Development Tool: PyCharm
# @Create Time: 2022/2/26
# @File Name: fetchtable.py
import sqlite3
conn = sqlite3.connect('../db/data.db')
cursor = conn.cursor()
cursor.execute('select * from sqlite_master where type="table"')
tables = []
for i in cursor.fetchall():
tables.append(i[1])
print(tables)