Skip to content

Commit

Permalink
Merge pull request #34 from opwoco/master
Browse files Browse the repository at this point in the history
added whereIn support
  • Loading branch information
xavierlacot committed Nov 15, 2013
2 parents c2d202c + dfa55f9 commit 41ec646
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 Down Expand Up @@ -269,6 +275,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 41ec646

Please sign in to comment.