code: private function getColumnNamesFromTable($tableName, $typeFilter = null)
      {
          if (!$this->connection->getSchemaManager()->tablesExist([$tableName])) {
              return [];
          }
  
          $result = [];
          foreach ($this->connection->getSchemaManager()->listTableColumns($tableName) as $column) {
              if (($typeFilter === null) || \in_array($column->getType()->getName(), $typeFilter, true)) {
                  $result[$column->getName()] = $column->getName();
              }
          }
  
          if (!empty($result)) {
              \asort($result);
  
              return $result;
          }
  
          return $result;
      }
docs: Retrieve all columns from a database table.
  
  @param string     $tableName  The database table name.
  
  @param array|null $typeFilter Optional of types to filter for.
  
  @return string[]