public function getAliasNames($table) {
    $names = [];
    if (is_array($this->table) && current($this->table) == $table) {
      $names[] = key($this->table);
    }
    foreach ($this->joins->getJoins() as $join) {
      $joinName = $join['name'];
      if (is_array($joinName) && current($joinName) == $table) {
        $names[] = key($joinName);
      }
    }
    return $names;
  }