code: function (keyColumn, valueColumn, cb) {
              var ret = new Promise(), map = {};
              if (isFunction(valueColumn)) {
                  cb = valueColumn;
                  valueColumn = null;
              }
              var k = this.__hashIdentifierToName(keyColumn), v = this.__hashIdentifierToName(valueColumn);
              return this.map(function (r) {
                  map[r[k]] = v ? r[v] : r;
              }).chain(function () {
                  return map;
              }).classic(cb).promise();
          }
docs: Returns a promise resolved with a hash with one column used as key and another used as value.
  If rows have duplicate values for the key column, the latter row(s)
  will overwrite the value of the previous row(s). If the valueColumn
  is not given or null, uses the entire hash as the value.
  
  @example
  // SELECT * FROM table
  DB.from("table").toHash("id", "name").chain(function(hash){
  // {1 : 'Jim', 2 : 'Bob', ...}
  });
  
  // SELECT * FROM table
  DB.from("table").toHash("id").chain(function(hash){
  // {1 : {id : 1, name : 'Jim'}, 2 : {id : 2, name : 'Bob'}, ...}
  });
  
  @param {String|patio.sql.Identifier\patio.sql.QualifiedIdentifier|patio.sql.AliasedExpression} keyColumn the column
  to use as the key in the returned hash.
  
  @param {String|patio.sql.Identifier\patio.sql.QualifiedIdentifier|patio.sql.AliasedExpression} [keyValue=null] the
  key of the column to use as the value in the hash
  
  @param {Function} [cb] the callback to invoke when the action is done.
  
  @return {comb.Promise} a promise that will be resolved with the resulting hash.