Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Bryan Kaperick
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
Hide 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 @@
if
(
options
.
query
===
undefined
)
{
options
.
query
=
""
;
}
if
(
options
.
sort_on
===
undefined
)
{
options
.
sort_on
=
[];
}
if
(
options
.
select_list
===
undefined
)
{
options
.
select_list
=
[];
}
if
(
options
.
include_revisions
===
undefined
)
{
options
.
include_revisions
=
false
;
}
options
.
query
=
jIO
.
QueryFactory
.
create
(
options
.
query
);
var
meta_options
=
{
query
:
""
,
sort_on
:
[[
"
timestamp
"
,
"
descending
"
]],
select_list
:
[
"
doc
"
,
"
op
"
,
"
doc_id
"
]
select_list
:
[
"
doc
"
,
"
op
"
,
"
doc_id
"
,
"
timestamp
"
]
},
include_revs
=
this
.
_include_revisions
;
...
...
@@ -554,8 +551,13 @@
// Put into correct format to be passed back to query storage
.
map
(
function
(
docum
)
{
docum
.
doc
=
docum
.
value
.
doc
;
docum
.
id
=
docum
.
value
.
doc_id
;
if
(
include_revs
)
{
docum
.
id
=
docum
.
value
.
timestamp
;
}
else
{
docum
.
id
=
docum
.
value
.
doc_id
;
}
delete
docum
.
value
.
doc_id
;
delete
docum
.
value
.
timestamp
;
delete
docum
.
value
.
op
;
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