code: function newAlias(tableName) {
      // base of alias is first char of table name
      var alias = tableName.charAt(0)
      // get all upper case characters from table name
      var ucChars = tableName.match(/[A-Z]/g)
      // if table name has upper case chars then convert to lower and add
      if (ucChars) {
          alias = alias+ucChars.join('').toLowerCase()
      }
      var i = 0
      // get alias with digit appended
      while (i < 99) {
          var uniqueAlias = alias + i
          // if alias not in use then use it
          if (!this.aliases[uniqueAlias]) {
              // add alias to map of aliases
              this.aliases[uniqueAlias] = tableName
              // first table use is the one used for selecting values
              if (!this.tableAliases[tableName]) {
                  this.tableAliases[tableName] = uniqueAlias
              }
              // return alias
              return uniqueAlias
          }
          // try next number
          i++
      }
      // if placeholder could not be found throw error
      throw new Error('max alias exceeded '+tableName)
  }
docs: @function newAlias
  
  create table alias
  
  @param {string} tableName
  
  @returns {string}
  
  @throws {Error}