lib/compiler.js
function columnInfo() {
    var column = this.single.columnInfo;
    return {
      sql: 'select * from information_schema.columns where table_name = ? and table_catalog = ?',
      bindings: [this.single.table, this.client.database()],
      output: function output(resp) {
        var out = resp.rows.reduce(function (columns, val) {
          columns[val.column_name] = {
            type: val.data_type,
            maxLength: val.character_maximum_length,
            nullable: val.is_nullable === 'YES',
            defaultValue: val.column_default
          };
          return columns;
        }, {});
        return column && out[column] || out;
      }
    };
  }
function columnInfo() {
    var column = this.single.columnInfo;
    return {
      sql: 'select * from information_schema.columns where table_name = ? and table_catalog = ?',
      bindings: [this.single.table, this.client.database()],
      output: function output(resp) {
        var out = resp.rows.reduce(function (columns, val) {
          columns[val.column_name] = {
            type: val.data_type,
            maxLength: val.character_maximum_length,
            nullable: val.is_nullable === 'YES',
            defaultValue: val.column_default
          };
          return columns;
        }, {});
        return column && out[column] || out;
      }
    };
  }
function columnInfo ( ) { var column = this . single . columnInfo ; return { sql : 'select * from information_schema.columns where table_name = ? and table_catalog = ?' , bindings : [ this . single . table , this . client . database ( ) ] , output : function output ( resp ) { var out = resp . rows . reduce ( function ( columns , val ) { columns [ val . column_name ] = { type : val . data_type , maxLength : val . character_maximum_length , nullable : val . is_nullable === 'YES' , defaultValue : val . column_default } ; return columns ; } , { } ) ; return column && out [ column ] || out ; } } ; }
Compiles a columnInfo query
Compiles a columnInfo query