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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
jio
Commits
3d03aafb
Commit
3d03aafb
authored
Jul 19, 2018
by
Bryan Kaperick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed allDocs behavior for returned id when include_revisions is true
parent
a1fa77a9
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
136 additions
and
99 deletions
+136
-99
src/jio.storage/historystorage.js
src/jio.storage/historystorage.js
+7
-5
test/jio.storage/historystorage.tests.js
test/jio.storage/historystorage.tests.js
+129
-94
No files found.
src/jio.storage/historystorage.js
View file @
3d03aafb
...
@@ -438,15 +438,12 @@
...
@@ -438,15 +438,12 @@
if
(
options
.
query
===
undefined
)
{
options
.
query
=
""
;
}
if
(
options
.
query
===
undefined
)
{
options
.
query
=
""
;
}
if
(
options
.
sort_on
===
undefined
)
{
options
.
sort_on
=
[];
}
if
(
options
.
sort_on
===
undefined
)
{
options
.
sort_on
=
[];
}
if
(
options
.
select_list
===
undefined
)
{
options
.
select_list
=
[];
}
if
(
options
.
select_list
===
undefined
)
{
options
.
select_list
=
[];
}
if
(
options
.
include_revisions
===
undefined
)
{
options
.
include_revisions
=
false
;
}
options
.
query
=
jIO
.
QueryFactory
.
create
(
options
.
query
);
options
.
query
=
jIO
.
QueryFactory
.
create
(
options
.
query
);
var
meta_options
=
{
var
meta_options
=
{
query
:
""
,
query
:
""
,
sort_on
:
[[
"
timestamp
"
,
"
descending
"
]],
sort_on
:
[[
"
timestamp
"
,
"
descending
"
]],
select_list
:
[
"
doc
"
,
"
op
"
,
"
doc_id
"
]
select_list
:
[
"
doc
"
,
"
op
"
,
"
doc_id
"
,
"
timestamp
"
]
},
},
include_revs
=
this
.
_include_revisions
;
include_revs
=
this
.
_include_revisions
;
...
@@ -554,8 +551,13 @@
...
@@ -554,8 +551,13 @@
// Put into correct format to be passed back to query storage
// Put into correct format to be passed back to query storage
.
map
(
function
(
docum
)
{
.
map
(
function
(
docum
)
{
docum
.
doc
=
docum
.
value
.
doc
;
docum
.
doc
=
docum
.
value
.
doc
;
if
(
include_revs
)
{
docum
.
id
=
docum
.
value
.
timestamp
;
}
else
{
docum
.
id
=
docum
.
value
.
doc_id
;
docum
.
id
=
docum
.
value
.
doc_id
;
}
delete
docum
.
value
.
doc_id
;
delete
docum
.
value
.
doc_id
;
delete
docum
.
value
.
timestamp
;
delete
docum
.
value
.
op
;
delete
docum
.
value
.
op
;
if
(
options
.
include_docs
)
{
if
(
options
.
include_docs
)
{
...
...
test/jio.storage/historystorage.tests.js
View file @
3d03aafb
This diff is collapsed.
Click to expand it.
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