From ff7d801f39a496de708dd6aaa5dbe852c58aadc9 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 28 Oct 2014 19:24:13 +0000 Subject: Add db controller/model to allow editing of any supported database --- db-model.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 db-model.lua (limited to 'db-model.lua') diff --git a/db-model.lua b/db-model.lua new file mode 100644 index 0000000..c9b99e3 --- /dev/null +++ b/db-model.lua @@ -0,0 +1,13 @@ +local mymodule = {} + +-- Load libraries +db = require("acf.db") +dbmodelfunctions = require("dbmodelfunctions") + +for n,f in pairs(dbmodelfunctions) do + mymodule[n] = function(...) + return f(db.create, ...) + end +end + +return mymodule -- cgit v1.2.3