Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
T
topjs3-demos
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leon Li
topjs3-demos
Commits
2a7a5a8a
Commit
2a7a5a8a
authored
Jan 15, 2020
by
Leon Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update query.js
parent
18e7d196
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
query.js
src/tophttpserver-api/query.js
+2
-13
No files found.
src/tophttpserver-api/query.js
View file @
2a7a5a8a
...
...
@@ -18,19 +18,8 @@ try {
if
(
!
_
.
isString
(
func
))
throw
"func must be a string!"
;
if
(
!
_
.
isArray
(
paras
))
throw
"paras must be an array!"
;
ver
=
DB
.
query
(
DBNAME
,
function
(
q
)
{
var
para_count
=
paras
.
length
;
if
(
para_count
===
0
)
{
r
=
q
[
func
]();
}
else
if
(
para_count
===
1
)
{
r
=
q
[
func
](
paras
[
0
]);
}
else
if
(
para_count
===
2
)
{
r
=
q
[
func
](
paras
[
0
],
paras
[
1
]);
}
else
if
(
para_count
===
3
)
{
r
=
q
[
func
](
paras
[
0
],
paras
[
1
],
paras
[
2
]);
}
else
{
throw
"only support 3 paras."
;
}
var
r
=
DB
.
query
(
DBNAME
,
function
(
q
)
{
var
r
=
q
[
func
].
apply
(
q
,
paras
);
if
(
q
.
lastError
().
isValid
())
throw
q
.
lastError
().
text
();
return
r
;
});
...
...
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