diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-10-28 19:24:13 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-10-28 19:24:13 +0000 |
commit | ff7d801f39a496de708dd6aaa5dbe852c58aadc9 (patch) | |
tree | b6c0398a92ff0f49bdd0ade5a336d61e5737c467 /db-model.lua | |
parent | 282d068aced3f88956af4182a353f8ea150caa2b (diff) | |
download | acf-db-ff7d801f39a496de708dd6aaa5dbe852c58aadc9.tar.bz2 acf-db-ff7d801f39a496de708dd6aaa5dbe852c58aadc9.tar.xz |
Add db controller/model to allow editing of any supported database
Diffstat (limited to 'db-model.lua')
-rw-r--r-- | db-model.lua | 13 |
1 files changed, 13 insertions, 0 deletions
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 |