lib/dataset/query.js
function (op, obj) {
            var pairs = [];
            if (Expression.isConditionSpecifier(obj)) {
                if (isHash(obj)) {
                    obj = array.toArray(obj);
                }
                obj.forEach(function (pair) {
                    pairs.push(new BooleanExpression(op, new Identifier(pair[0]), pair[1]));
                });
            }
            return pairs.length === 1 ? pairs[0] : BooleanExpression.fromArgs(["AND"].concat(pairs));
        }
function (op, obj) {
            var pairs = [];
            if (Expression.isConditionSpecifier(obj)) {
                if (isHash(obj)) {
                    obj = array.toArray(obj);
                }
                obj.forEach(function (pair) {
                    pairs.push(new BooleanExpression(op, new Identifier(pair[0]), pair[1]));
                });
            }
            return pairs.length === 1 ? pairs[0] : BooleanExpression.fromArgs(["AND"].concat(pairs));
        }
function ( op , obj ) { var pairs = [ ] ; if ( Expression . isConditionSpecifier ( obj ) ) { if ( isHash ( obj ) ) { obj = array . toArray ( obj ) ; } obj . forEach ( function ( pair ) { pairs . push ( new BooleanExpression ( op , new Identifier ( pair [ 0 ] ) , pair [ 1 ] ) ) ; } ) ; } return pairs . length === 1 ? pairs [ 0 ] : BooleanExpression . fromArgs ( [ "AND" ] . concat ( pairs ) ) ; }
Creates a boolean expression that each key is compared to its value using the provided operator.

@example

ds.__createBoolExpression("gt", {x : 1, y:2, z : 5}) //=> WHERE ((x > 1) AND (y > 2) AND (z > 5))
ds.__createBoolExpression("gt", [[x, 1], [y,2], [z, 5]) //=> WHERE ((x > 1) AND (y > 2) AND (z > 5))
ds.__createBoolExpression("lt", {x : 1, y:2, z : 5}) //=> WHERE ((x < 1) AND (y < 2) AND (z < 5))
ds.__createBoolExpression("lt", [[x, 1], [y,2], [z, 5]) //=> WHERE ((x < 1) AND (y < 2) AND (z < 5))

@param {String} op valid boolean expression operator to capare each K,V pair with
@param {Object| Array } obj object or two dimensional array containing key value pairs

@return {patio.sql.BooleanExpression} boolean expression joined by a AND of each key value pair compared by the op
Creates a boolean expression that each key is compared to its value using the provided operator .