Skip to content

Commit

Permalink
added whereIn support
Browse files Browse the repository at this point in the history
  • Loading branch information
CBeloch committed Nov 7, 2012
1 parent 931bea4 commit dfa55f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions joli.js
Expand Up @@ -242,6 +242,12 @@ var joliCreator = function() {
q.where(field, value);
});
}

if (constraints.whereIn) {
joli.each(constraints.whereIn, function(value, field) {
q.whereIn(field, value);
});
}

if (constraints.order) {
q.order(constraints.order);
Expand All @@ -265,6 +271,12 @@ var joliCreator = function() {
q.where(field, value);
});
}

if (constraints.whereIn) {
joli.each(constraints.whereIn, function(value, field) {
q.whereIn(field, value);
});
}

return parseInt(q.execute(), 10);
},
Expand Down

0 comments on commit dfa55f9

Please sign in to comment.