Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acf-db
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ACF
acf-db
Commits
7166ee9f
Commit
7166ee9f
authored
Sep 28, 2013
by
Ted Trask
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added listdatabases action and changed prototype for list_tables model function
parent
fa0bd17a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
dbcontrollerfunctions.lua
dbcontrollerfunctions.lua
+5
-1
dbmodelfunctions.lua
dbmodelfunctions.lua
+14
-1
No files found.
dbcontrollerfunctions.lua
View file @
7166ee9f
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
)
...
...
dbmodelfunctions.lua
View file @
7166ee9f
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment