Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sencha-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
sencha-core
Commits
f379c023
Commit
f379c023
authored
Dec 05, 2019
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- beautified source
parent
9a6e9052
Pipeline
#611
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
sencha-core-procs.tcl
tcl/sencha-core-procs.tcl
+7
-7
No files found.
tcl/sencha-core-procs.tcl
View file @
f379c023
...
...
@@ -118,18 +118,18 @@ ad_proc -public im_sencha_sql_to_store {
}
# Loop through the list of rows returned
while
{
[
db_getrow
$db
$selection
]
}
{
while
{
[
db_getrow
$db
$selection
]
}
{
set json_entry
{}
for
{
set i 0
}
{
$i
<
[
ns_set size
$selection
]
}
{
incr i
}
{
for
{
set
i 0
}
{
$i
<
[
ns_set size
$selection
]
}
{
incr i
}
{
set var
[
lindex
$col
_names
$i
]
set val
[
ns_set value
$selection
$i
]
if
{
""
eq
$val
}
{
lappend json_entry
"
$var
:
null"
}
else
if
{[
string
is
integer
$val
]}
{
lappend json_entry
"
$var
:
$val
"
lappend json_entry
"
'
$var
'
: null"
}
else
if
{[
string
is
double
$val
]}
{
lappend json_entry
"
'
$var
'
:
$val
"
}
else
{
set val_quoted
[
im_quotejson
$val
]
lappend json_entry
"
$var
:
'
$val
_quoted'"
lappend json_entry
"
'
$var
'
: '
$val
_quoted'"
}
}
lappend json_list
[
join
$json
_entry
", "
]
...
...
@@ -149,7 +149,7 @@ ad_proc -public im_sencha_sql_to_store {
if
{
$data
_source_p
}
{
# Return the JSON structure suitable as a data-source
return
"{
\"
success
\"
: true,
\"
message
\"
:
\"
Data loaded
\"
,
\"
data
\"
:
\[
{
$data
_json }
\]
}"
return
"{
\"
success
\"
: true,
\"
message
\"
:
\"
Data loaded
\"
,
\"
data
\"
:
\[
\n\t\t
{
$data
_json }
\]
}"
}
else
{
# Return two values: 1. the store JSON, 2. the list of columns used
...
...
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