1: local 字集库 = require("u8_to_a")
2: local 档库 = require("lsqlite3")
3: local 文库 = require(字集库.u8_to_a("算机_程语_月_基类_文"))
4: local 对库 = require(字集库.u8_to_a("算机_程语_月_基类_表_对"))
81b66699fb 2024-02-12 5: local d = {}
6: local 卡档
7: --~ 卡编
81b66699fb 2024-02-12 8: function d.取卡对(o1)
9: local k1_0, k2_0
10: --~ 卡文对
81b66699fb 2024-02-12 11: k1_0 = d.取卡文(o1)
12: --~ 卡数据对
81b66699fb 2024-02-12 13: k2_0 = d.取卡数据(o1)
14: return 对库.连两对(k1_0, k2_0)
15: end
16: --~ 卡编
81b66699fb 2024-02-12 17: function d._取卡对(o1, o2)
18: for o1_4 in 卡档:nrows(文库.连(o2, o1)) do
19: return o1_4
20: end
21: end
22: do
23: local k1
24: --~ 模
25: k1 = "select * from texts where id = "
26: --~ 卡编
81b66699fb 2024-02-12 27: function d.取卡文(o1)
81b66699fb 2024-02-12 28: return d._取卡对(o1, k1)
29: end
30: end
31: do
32: local k1
33: --~ 模
34: k1 = "select * from datas where id = "
35: --~ 卡编
81b66699fb 2024-02-12 36: function d.取卡数据(o1)
81b66699fb 2024-02-12 37: return d._取卡对(o1, k1)
38: end
39: end
40: --~ 卡档路
81b66699fb 2024-02-12 41: function d.启卡档(o1)
42: 卡档 = 档库.open(o1)
43: end
81b66699fb 2024-02-12 44: return d