Commit 7166ee9f authored by Ted Trask's avatar Ted Trask

Added listdatabases action and changed prototype for list_tables model function

parent fa0bd17a
module(..., package.seeall)
function listdatabases(self)
return self.model.list_databases(self, self.clientdata)
end
function listtables(self)
return self.model.list_tables()
return self.model.list_tables(self, self.clientdata)
end
function viewtable(self)
......
......@@ -2,7 +2,20 @@ module(..., package.seeall)
-- Helper library for model functions for viewing and editing database entries
-- Relies heavily on the acf-lib/db.lua library (db object passed into each function)
function list_tables(db)
function list_databases(db, self, clientdata)
local retval = {}
local errtxt
local res, err = pcall(function()
retval = db.listdatabases()
end)
if not res and err then
errtxt = err
end
return cfe({ type="list", value=retval, label="List of Databases", errtxt=errtxt })
end
function list_tables(db, self, clientdata)
local retval = {}
local errtxt
local res, err = pcall(function()
......
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