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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aurel
jio
Commits
16436c04
Commit
16436c04
authored
Jun 30, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mappingstorage: test on reduce query number
parent
1d8863cf
Changes
1
Hide 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 @
16436c04
...
@@ -10,12 +10,15 @@
...
@@ -10,12 +10,15 @@
if
(
storage
.
_no_sub_query_id
)
{
if
(
storage
.
_no_sub_query_id
)
{
throw
new
jIO
.
util
.
jIOError
(
'
no sub query id active
'
,
404
);
throw
new
jIO
.
util
.
jIOError
(
'
no sub query id active
'
,
404
);
}
}
if
(
value
===
undefined
)
{
if
(
!
value
)
{
throw
new
jIO
.
util
.
jIOError
(
throw
new
jIO
.
util
.
jIOError
(
'
can not find document with
'
+
key
+
'
: undefined
'
,
'
can not find document with
'
+
key
+
'
: undefined
'
,
404
404
);
);
}
}
if
(
storage
.
_mapping_id_memory_dict
[
value
])
{
return
storage
.
_mapping_id_memory_dict
[
value
];
}
query
=
new
SimpleQuery
({
query
=
new
SimpleQuery
({
key
:
key
,
key
:
key
,
value
:
value
,
value
:
value
,
...
@@ -46,6 +49,7 @@
...
@@ -46,6 +49,7 @@
throw
new
TypeError
(
"
id must be unique field:
"
+
key
throw
new
TypeError
(
"
id must be unique field:
"
+
key
+
"
, result:
"
+
data
.
data
.
rows
.
toString
());
+
"
, result:
"
+
data
.
data
.
rows
.
toString
());
}
}
storage
.
_mapping_id_memory_dict
[
value
]
=
data
.
data
.
rows
[
0
].
id
;
return
data
.
data
.
rows
[
0
].
id
;
return
data
.
data
.
rows
[
0
].
id
;
});
});
}
}
...
@@ -202,6 +206,7 @@
...
@@ -202,6 +206,7 @@
this
.
_query
.
query
=
QueryFactory
.
create
(
this
.
_query
.
query
);
this
.
_query
.
query
=
QueryFactory
.
create
(
this
.
_query
.
query
);
}
}
this
.
_default_mapping
=
{};
this
.
_default_mapping
=
{};
this
.
_mapping_id_memory_dict
=
{};
initializeQueryAndDefaultMapping
(
this
);
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