Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
jio
Commits
30ce96a4
Commit
30ce96a4
authored
Mar 10, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jio.js updated
parent
aae4a9af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
jio.js
jio.js
+18
-4
No files found.
jio.js
View file @
30ce96a4
...
@@ -4363,7 +4363,7 @@ function ComplexQuery(spec, key_schema) {
...
@@ -4363,7 +4363,7 @@ function ComplexQuery(spec, key_schema) {
* @default "AND"
* @default "AND"
* @optional
* @optional
*/
*/
this
.
operator
=
spec
.
operator
||
"
AND
"
;
this
.
operator
=
spec
.
operator
;
/**
/**
* The sub Query list which are used to query an item.
* The sub Query list which are used to query an item.
...
@@ -4384,6 +4384,9 @@ function ComplexQuery(spec, key_schema) {
...
@@ -4384,6 +4384,9 @@ function ComplexQuery(spec, key_schema) {
}
}
inherits
(
ComplexQuery
,
Query
);
inherits
(
ComplexQuery
,
Query
);
ComplexQuery
.
prototype
.
operator
=
"
AND
"
;
ComplexQuery
.
prototype
.
type
=
"
complex
"
;
/**
/**
* #crossLink "Query/match:method"
* #crossLink "Query/match:method"
*/
*/
...
@@ -4399,12 +4402,20 @@ ComplexQuery.prototype.match = function (item) {
...
@@ -4399,12 +4402,20 @@ ComplexQuery.prototype.match = function (item) {
* #crossLink "Query/toString:method"
* #crossLink "Query/toString:method"
*/
*/
ComplexQuery
.
prototype
.
toString
=
function
()
{
ComplexQuery
.
prototype
.
toString
=
function
()
{
var
str_list
=
[
"
(
"
],
this_operator
=
this
.
operator
;
var
str_list
=
[],
this_operator
=
this
.
operator
;
if
(
this
.
operator
===
"
NOT
"
)
{
str_list
.
push
(
"
NOT (
"
);
str_list
.
push
(
this
.
query_list
[
0
].
toString
());
str_list
.
push
(
"
)
"
);
return
str_list
.
join
(
"
"
);
}
this
.
query_list
.
forEach
(
function
(
query
)
{
this
.
query_list
.
forEach
(
function
(
query
)
{
str_list
.
push
(
"
(
"
);
str_list
.
push
(
query
.
toString
());
str_list
.
push
(
query
.
toString
());
str_list
.
push
(
"
)
"
);
str_list
.
push
(
this_operator
);
str_list
.
push
(
this_operator
);
});
});
str_list
[
str_list
.
length
-
1
]
=
"
)
"
;
// replace last operator
str_list
.
length
-=
1
;
return
str_list
.
join
(
"
"
);
return
str_list
.
join
(
"
"
);
};
};
...
@@ -4418,7 +4429,9 @@ ComplexQuery.prototype.serialized = function () {
...
@@ -4418,7 +4429,9 @@ ComplexQuery.prototype.serialized = function () {
"
query_list
"
:
[]
"
query_list
"
:
[]
};
};
this
.
query_list
.
forEach
(
function
(
query
)
{
this
.
query_list
.
forEach
(
function
(
query
)
{
s
.
query_list
.
push
(
query
.
serialized
());
s
.
query_list
.
push
(
typeof
query
.
toJSON
===
"
function
"
?
query
.
toJSON
()
:
query
);
});
});
return
s
;
return
s
;
};
};
...
@@ -4678,6 +4691,7 @@ function SimpleQuery(spec, key_schema) {
...
@@ -4678,6 +4691,7 @@ function SimpleQuery(spec, key_schema) {
}
}
inherits
(
SimpleQuery
,
Query
);
inherits
(
SimpleQuery
,
Query
);
SimpleQuery
.
prototype
.
type
=
"
simple
"
;
var
checkKey
=
function
(
key
)
{
var
checkKey
=
function
(
key
)
{
var
prop
;
var
prop
;
...
...
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