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