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
4e69547a
Commit
4e69547a
authored
Oct 27, 2016
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mappingstorage: add default_value in queries
parent
068b809a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
src/jio.storage/mappingstorage.js
src/jio.storage/mappingstorage.js
+28
-0
No files found.
src/jio.storage/mappingstorage.js
View file @
4e69547a
...
...
@@ -12,6 +12,34 @@
this
.
_id_is_mapped
=
(
this
.
_mapping_dict
.
id
!==
undefined
&&
this
.
_mapping_dict
.
id
.
equal
!==
"
id
"
);
var
property
,
query_list
=
[];
// handle default_value.
for
(
property
in
this
.
_mapping_dict
)
{
if
(
this
.
_mapping_dict
.
hasOwnProperty
(
property
))
{
if
(
this
.
_mapping_dict
[
property
].
default_value
!==
undefined
)
{
query_list
.
push
(
new
SimpleQuery
({
key
:
property
,
value
:
this
.
_mapping_dict
[
property
].
default_value
,
type
:
"
simple
"
}));
}
}
}
if
(
this
.
_query
.
query
!==
undefined
)
{
query_list
.
push
(
QueryFactory
.
create
(
this
.
_query
.
query
));
}
if
(
query_list
.
length
>
1
)
{
this
.
_query
.
query
=
new
ComplexQuery
({
type
:
"
complex
"
,
query_list
:
query_list
,
operator
:
"
AND
"
});
}
else
if
(
query_list
.
length
===
1
)
{
this
.
_query
.
query
=
query_list
[
0
];
}
}
function
getAttachmentId
(
storage
,
sub_id
,
attachment_id
,
method
)
{
...
...
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