Commit ff7d801f authored by Ted Trask's avatar Ted Trask

Add db controller/model to allow editing of any supported database

parent 282d068a
...@@ -27,6 +27,9 @@ phony+=install ...@@ -27,6 +27,9 @@ phony+=install
install: install-recursive $(SUBDIRS) install: install-recursive $(SUBDIRS)
mkdir -p "$(install_dir)" mkdir -p "$(install_dir)"
cp -a $(APP_DIST) "$(install_dir)" cp -a $(APP_DIST) "$(install_dir)"
for i in $$(ls -1 $(DESTDIR)/$(acflibdir)/db-*.lsp); do\
ln -sf $$i $(install_dir)/$$(echo "$$(basename $$i)" | sed "s/db/$(APP_NAME)/");\
done
include config.mk include config.mk
......
local mymodule = {}
mymodule.default_action = "listdatabases"
-- Use acf-db-lib to allow editing of the database
dbcontrollerfunctions = require("dbcontrollerfunctions")
for n,f in pairs(dbcontrollerfunctions) do
mymodule[n] = f
end
return mymodule
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
#CAT GROUP/DESC TAB ACTION
Applications 25Databases Databases listdatabases
ADMIN=db:listdatabases,db:listtables,db:viewtable,db:deletetableentry,db:updatetableentry,db:createtableentry
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment