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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
jio
Commits
6ec160ef
Commit
6ec160ef
authored
Jun 17, 2015
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QueryStorage: documents do not have an _id property anymore
parent
c408d263
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
src/jio.storage/querystorage.js
src/jio.storage/querystorage.js
+5
-4
test/jio.storage/querystorage.tests.js
test/jio.storage/querystorage.tests.js
+0
-2
No files found.
src/jio.storage/querystorage.js
View file @
6ec160ef
...
@@ -156,10 +156,11 @@
...
@@ -156,10 +156,11 @@
if
(
is_manual_query_needed
)
{
if
(
is_manual_query_needed
)
{
len
=
result
.
length
;
len
=
result
.
length
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
result
[
i
].
doc
.
__id
=
result
[
i
].
id
;
data_rows
.
push
(
result
[
i
].
doc
);
data_rows
.
push
(
result
[
i
].
doc
);
}
}
if
(
options
.
select_list
)
{
if
(
options
.
select_list
)
{
options
.
select_list
.
push
(
"
_id
"
);
options
.
select_list
.
push
(
"
_
_
id
"
);
}
}
result
=
jIO
.
QueryFactory
.
create
(
options
.
query
||
""
,
result
=
jIO
.
QueryFactory
.
create
(
options
.
query
||
""
,
context
.
_key_schema
).
context
.
_key_schema
).
...
@@ -178,13 +179,13 @@
...
@@ -178,13 +179,13 @@
len
=
result
.
length
;
len
=
result
.
length
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
element
=
{
element
=
{
id
:
result
[
i
].
_id
,
id
:
result
[
i
].
_
_
id
,
value
:
options
.
select_list
?
result
[
i
]
:
{},
value
:
options
.
select_list
?
result
[
i
]
:
{},
doc
:
{}
doc
:
{}
};
};
if
(
options
.
select_list
)
{
if
(
options
.
select_list
)
{
// Does not work if user manually request _id
// Does not work if user manually request _
_
id
delete
element
.
value
.
_id
;
delete
element
.
value
.
_
_
id
;
}
}
if
(
options
.
include_docs
)
{
if
(
options
.
include_docs
)
{
// XXX To implement
// XXX To implement
...
...
test/jio.storage/querystorage.tests.js
View file @
6ec160ef
...
@@ -764,7 +764,6 @@
...
@@ -764,7 +764,6 @@
doc
:
{
doc
:
{
title
:
"
foo
"
,
title
:
"
foo
"
,
id
:
"
ID foo
"
,
id
:
"
ID foo
"
,
_id
:
"
foo
"
,
another
:
"
property
"
another
:
"
property
"
}
}
},
{
},
{
...
@@ -773,7 +772,6 @@
...
@@ -773,7 +772,6 @@
doc
:
{
doc
:
{
title
:
"
bar
"
,
title
:
"
bar
"
,
id
:
"
ID bar
"
,
id
:
"
ID bar
"
,
_id
:
"
bar
"
,
another
:
"
property
"
another
:
"
property
"
}
}
}];
}];
...
...
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