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
c972d267
Commit
c972d267
authored
Nov 03, 2014
by
Ted Trask
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check with database and only display default and null options if applicable
parent
d0ce28f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
lib/db-createtableentry-html.lsp
lib/db-createtableentry-html.lsp
+0
-1
lib/dbmodelfunctions.lua
lib/dbmodelfunctions.lua
+7
-3
No files found.
lib/db-createtableentry-html.lsp
View file @
c972d267
...
...
@@ -58,7 +58,6 @@ for x,name in ipairs(order) do
htmlviewfunctions.displayitemmiddle(myitem, nil, header_level2)
htmlviewfunctions.displayformitem(myitem, name, -1, "fields")
if not myitem.readonly and form.value.defaults and form.value.defaults.value[name] then
form.value.defaults.value[name].descr = "Default"
form.value.defaults.value[name].class = "defaults"
htmlviewfunctions.displayformitem(form.value.defaults.value[name], name, -1, "defaults")
end
...
...
lib/dbmodelfunctions.lua
View file @
c972d267
...
...
@@ -153,11 +153,15 @@ function mymodule.get_new_table_entry(dbase, self, clientdata)
retval
.
value
.
fields
=
cfe
({
type
=
"group"
,
value
=
{},
label
=
"Table Fields"
,
seq
=
2
})
retval
.
value
.
nulls
=
cfe
({
type
=
"group"
,
value
=
{},
label
=
"Null Value Table Fields"
,
seq
=
3
})
retval
.
value
.
defaults
=
cfe
({
type
=
"group"
,
value
=
{},
label
=
"Default Value Table Fields"
,
seq
=
4
})
local
fields
=
db
.
listcolumns
(
retval
.
value
.
table
.
value
)
local
fields
,
defaults
,
nullable
=
db
.
listcolumns
(
retval
.
value
.
table
.
value
)
for
i
,
f
in
ipairs
(
fields
)
do
retval
.
value
.
fields
.
value
[
f
]
=
cfe
({
label
=
f
,
seq
=
i
})
retval
.
value
.
nulls
.
value
[
f
]
=
cfe
({
type
=
"boolean"
,
value
=
false
,
label
=
f
,
seq
=
i
})
retval
.
value
.
defaults
.
value
[
f
]
=
cfe
({
type
=
"boolean"
,
value
=
false
,
label
=
f
,
seq
=
i
})
if
nullable
[
f
]
then
retval
.
value
.
nulls
.
value
[
f
]
=
cfe
({
type
=
"boolean"
,
value
=
false
,
label
=
f
,
seq
=
i
})
end
if
defaults
[
f
]
then
retval
.
value
.
defaults
.
value
[
f
]
=
cfe
({
type
=
"boolean"
,
value
=
false
,
label
=
f
,
default
=
defaults
[
f
],
seq
=
i
})
end
end
end
if
connected
then
db
.
databasedisconnect
()
end
...
...
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