Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Alexandra Rogova
jio_mebibou
Commits
f3e3a9f0
Commit
f3e3a9f0
authored
Dec 31, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass wildcard_character to .cmp()
parent
1f88c5ad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
docs/keys.rst
docs/keys.rst
+2
-1
src/queries/core/simplequery.js
src/queries/core/simplequery.js
+2
-2
No files found.
docs/keys.rst
View file @
f3e3a9f0
...
...
@@ -145,7 +145,7 @@ property, that behaves like the ``compareFunction`` described in
...
return {
...
'cmp': function (b) {
'cmp': function (b
, wildcard_character
) {
if (a < b) {
return -1;
}
...
...
@@ -161,6 +161,7 @@ property, that behaves like the ``compareFunction`` described in
cast_to: myType
...
``wildcard_character`` is only passed by ``=`` and ``!=`` operators.
If the < or > comparison makes no sense for the objects, the function should return ``undefined``.
...
...
src/queries/core/simplequery.js
View file @
f3e3a9f0
...
...
@@ -205,7 +205,7 @@ SimpleQuery.prototype["="] = function (object_value, comparison_value,
return
false
;
}
if
(
value
.
cmp
!==
undefined
)
{
return
value
.
cmp
(
comparison_value
)
===
0
;
return
value
.
cmp
(
comparison_value
,
wildcard_character
)
===
0
;
}
if
(
convertStringToRegExp
(
...
...
@@ -249,7 +249,7 @@ SimpleQuery.prototype["!="] = function (object_value, comparison_value,
return
true
;
}
if
(
value
.
cmp
!==
undefined
)
{
return
value
.
cmp
(
comparison_value
)
!==
0
;
return
value
.
cmp
(
comparison_value
,
wildcard_character
)
!==
0
;
}
if
(
convertStringToRegExp
(
...
...
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