code: function (obj, invert) {
              var pairs = [];
              for (var i in obj) {
                  var v = obj[i];
                  if (Array.isArray(v) && v.length) {
                      var ident = this.stringToIdentifier(i);
                      pairs.push(new BooleanExpression("AND", new BooleanExpression("gte", ident, v[0]), new BooleanExpression("lte", ident, v[1])));
                  } else {
                      throw new QueryError("Between requires an array for the value");
                  }
              }
              var ret = pairs.length === 1 ? pairs[0] : BooleanExpression.fromArgs(["AND"].concat(pairs));
              return invert ? BooleanExpression.invert(ret) : ret;
          }
docs: @private
  
  Creates a boolean expression where the key is '>=' value 1 and '<=' value two.
  
  @example
  
  ds.__createBetweenExpression({x : [1,2]}) => //=> WHERE ((x >= 1) AND (x <= 10))
  ds.__createBetweenExpression({x : [1,2]}, true) => //=> WHERE ((x < 1) OR (x > 10))
  
  @param {Object} obj object where the keys are columns and the values are two element arrays.
  @param {Boolean} [invert] if set to true it inverts the between to make it not between the two values
  
  @return {patio.sql.BooleanExpression} a boolean expression containing the between expression.