-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodule_db.lua
54 lines (43 loc) · 1.08 KB
/
module_db.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by wakfu.
--- DateTime: 2020/8/1 11:37
---
Orm = {}
-- 开启数据库连接
---@param dialect string 数据库类型
---@param path string 数据库地址
---@param enableLog boolean 是否打开数据库log
function Orm.new(dialect, path, enableLog, tag)
local obj = db_module.new(dialect, path, enableLog, tag)
return obj
end
-- 关闭所有数据库连接
function Orm.closeDbByTag(tag)
local obj = db_module.closeDbByTag(tag)
return obj
end
-- 关闭所有数据库连接
function Orm.closeAllDb()
local obj = db_module.closeAllDb()
return obj
end
print("***********db_module.lua****************")
--*********************go实现的接口api工具类,便于提供代码提示**************************
--获取列表
---@return number|table
function Orm:Raw(execSql)
end
--运行sql
---@return number|table
function Orm:Exec(execSql)
end
--获取标签
---@return number|table
function Orm:Tag()
end
--关闭数据库连接
---@return number|string
function Orm:CloseDB()
end
return Orm