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
c7f3b357
Commit
c7f3b357
authored
Mar 10, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master'
parents
183547fb
83f6069e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
6 deletions
+40
-6
Makefile
Makefile
+1
-2
docs/_static/jio-2.0.0-wip-min.zip
docs/_static/jio-2.0.0-wip-min.zip
+0
-0
docs/_static/jio-2.0.0-wip.zip
docs/_static/jio-2.0.0-wip.zip
+0
-0
jio.js
jio.js
+11
-2
src/queries/core/simplequery.js
src/queries/core/simplequery.js
+11
-2
test/queries/key.tests.js
test/queries/key.tests.js
+17
-0
No files found.
Makefile
View file @
c7f3b357
...
...
@@ -26,11 +26,10 @@ zip:
@
mkdir
$(TMPDIR)
/jio
@
mkdir
$(TMPDIR)
/jio/storage
@
cp
jio.js
$(TMPDIR)
/jio/
@
cp
jiodate.js
$(TMPDIR)
/jio/
@
cp
jioquery.js
$(TMPDIR)
/jio/
@
cp
src/sha1.amd.js
$(TMPDIR)
/jio/
@
cp
src/sha2.amd.js
$(TMPDIR)
/jio/
@
cp
src/sha256.amd.js
$(TMPDIR)
/jio/
@
cp
src/jio.date/jiodate.js
$(TMPDIR)
/jio/
@
cp
lib/rsvp/rsvp-custom.js
$(TMPDIR)
/jio/
@
cp
lib/rsvp/rsvp-custom.amd.js
$(TMPDIR)
/jio/
@
cp
lib/jquery/jquery.js
$(TMPDIR)
/jio/
...
...
docs/_static/jio-2.0.0-wip-min.zip
View file @
c7f3b357
No preview for this file type
docs/_static/jio-2.0.0-wip.zip
View file @
c7f3b357
No preview for this file type
jio.js
View file @
c7f3b357
...
...
@@ -4773,8 +4773,17 @@ SimpleQuery.prototype.match = function (item) {
cast_to
=
this
.
_key_schema
.
cast_lookup
[
cast_to
];
}
value
=
cast_to
(
value
);
object_value
=
cast_to
(
object_value
);
try
{
value
=
cast_to
(
value
);
}
catch
(
e
)
{
value
=
undefined
;
}
try
{
object_value
=
cast_to
(
object_value
);
}
catch
(
e
)
{
object_value
=
undefined
;
}
}
}
else
{
object_value
=
item
[
key
];
...
...
src/queries/core/simplequery.js
View file @
c7f3b357
...
...
@@ -159,8 +159,17 @@ SimpleQuery.prototype.match = function (item) {
cast_to
=
this
.
_key_schema
.
cast_lookup
[
cast_to
];
}
value
=
cast_to
(
value
);
object_value
=
cast_to
(
object_value
);
try
{
value
=
cast_to
(
value
);
}
catch
(
e
)
{
value
=
undefined
;
}
try
{
object_value
=
cast_to
(
object_value
);
}
catch
(
e
)
{
object_value
=
undefined
;
}
}
}
else
{
object_value
=
item
[
key
];
...
...
test/queries/key.tests.js
View file @
c7f3b357
...
...
@@ -130,6 +130,10 @@
read_from
:
'
date
'
,
cast_to
:
dateCast
,
equal_match
:
sameYear
},
broken
:
{
read_from
:
'
date
'
,
cast_to
:
function
()
{
throw
new
Error
(
'
Broken!
'
);
}
}
};
...
...
@@ -178,6 +182,19 @@
})
);
promise
.
push
(
jIO
.
QueryFactory
.
create
({
type
:
'
simple
'
,
key
:
keys
.
broken
,
value
:
'
2013-02-10
'
}).
exec
(
docList
()).
then
(
function
(
dl
)
{
deepEqual
(
dl
.
length
,
0
,
'
Constructors that throw exceptions should not break a query, but silently fail comparisons
'
);
})
);
RSVP
.
all
(
promise
).
then
(
noop
).
always
(
start
);
});
...
...
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