You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
714 B

2 years ago
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2023/6/22 21:55
# @Author : old tom
# @File : main.py
# @Project : futool-db-lite
# @Desc : 数据库测试
from session.engine.dbengine import DatabaseEngine
if __name__ == '__main__':
db_engine = DatabaseEngine('testdb')
session_factory = db_engine.create_session_factory()
sql_session = session_factory.open_session()
# print(sql_session.select_all('select * from metadata_object'))
sql_session.select_one('select * from metadata_object')
sql_session.select_many('select * from metadata_object', 2)
# print(sql_session.delete('delete from metadata_object where meta_id=1657707190871527425'))
sql_session.close()