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
Aurélien Vermylen
jio
Commits
69175cc1
Commit
69175cc1
authored
Jun 30, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mappingstorage: test on reduce query number
parent
1d9dd278
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/jio.storage/mappingstorage.js
src/jio.storage/mappingstorage.js
+6
-1
No files found.
src/jio.storage/mappingstorage.js
View file @
69175cc1
...
...
@@ -10,12 +10,15 @@
if
(
storage
.
_no_sub_query_id
)
{
throw
new
jIO
.
util
.
jIOError
(
'
no sub query id active
'
,
404
);
}
if
(
value
===
undefined
)
{
if
(
!
value
)
{
throw
new
jIO
.
util
.
jIOError
(
'
can not find document with
'
+
key
+
'
: undefined
'
,
404
);
}
if
(
storage
.
_mapping_id_memory_dict
[
value
])
{
return
storage
.
_mapping_id_memory_dict
[
value
];
}
query
=
new
SimpleQuery
({
key
:
key
,
value
:
value
,
...
...
@@ -46,6 +49,7 @@
throw
new
TypeError
(
"
id must be unique field:
"
+
key
+
"
, result:
"
+
data
.
data
.
rows
.
toString
());
}
storage
.
_mapping_id_memory_dict
[
value
]
=
data
.
data
.
rows
[
0
].
id
;
return
data
.
data
.
rows
[
0
].
id
;
});
}
...
...
@@ -202,6 +206,7 @@
this
.
_query
.
query
=
QueryFactory
.
create
(
this
.
_query
.
query
);
}
this
.
_default_mapping
=
{};
this
.
_mapping_id_memory_dict
=
{};
initializeQueryAndDefaultMapping
(
this
);
}
...
...
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