protected function tryParseIndexColumns()
{
$c = $this->cur();
if ($c == '(') {
$this->advance();
$this->skipSpaces();
$indexColumns = [];
while ($columnName = $this->tryParseIdentifier()) {
$indexColumn = new stdClass();
$indexColumn->name = $columnName->val;
if ($this->tryParseKeyword(['COLLATE'])) {
$this->skipSpaces();
if ($collationName = $this->tryParseIdentifier()) {
$indexColumn->collationName = $collationName->val;
}
}
if ($ordering = $this->tryParseKeyword(['ASC', 'DESC'])) {
$indexColumn->ordering = $ordering->val;
}
$this->skipSpaces();
if ($this->metComma()) {
$this->skipComma();
}
$this->skipSpaces();
$indexColumns[] = $indexColumn;
}
if ($this->cur() == ')') {
$this->advance();
}
return $indexColumns;
}
return;
}