lib/compiler.js
function toSQL(method) {
    method = method || this.method;
    var val = this[method]();
    var defaults = {
      method: method,
      options: assign({}, this.options),
      bindings: this.formatter.bindings
    };
    if (typeof val === 'string') {
      val = { sql: val };
    }

    if (method === 'select' && this.single.as) {
      defaults.as = this.single.as;
    }
    var out = assign(defaults, val);
    debug(out);
    return out;
  }
function toSQL(method) {
    method = method || this.method;
    var val = this[method]();
    var defaults = {
      method: method,
      options: assign({}, this.options),
      bindings: this.formatter.bindings
    };
    if (typeof val === 'string') {
      val = { sql: val };
    }

    if (method === 'select' && this.single.as) {
      defaults.as = this.single.as;
    }
    var out = assign(defaults, val);
    debug(out);
    return out;
  }
function toSQL ( method ) { method = method || this . method ; var val = this [ method ] ( ) ; var defaults = { method : method , options : assign ( { } , this . options ) , bindings : this . formatter . bindings } ; if ( typeof val === 'string' ) { val = { sql : val } ; } if ( method === 'select' && this . single . as ) { defaults . as = this . single . as ; } var out = assign ( defaults , val ) ; debug ( out ) ; return out ; }
Collapse the builder into a single object
Collapse the builder into a single object