public function setTable($tableName)
{
$this->tableName = $tableName;
$schemaManager = self::$conn->getSchemaManager();
$tableSchema = $schemaManager->listTableColumns($tableName);
foreach ($tableSchema as $column) {
$this->columns[] = $column;
}
$this->totalFields = count($this->columns);
if (empty($tableSchema)) {
throw new ConnectionException(sprintf('Error in database connection, please check the configuration parameter and the table name "%s"', $tableName));
}
}