56 if ($tokenizer->getCurrentToken()->text !==
'(')
58 $indexName = $tokenizer->getCurrentToken()->text;
59 $tokenizer->nextToken();
60 $tokenizer->skipWhiteSpace();
64 if ($tokenizer->testUpperText(
'ON'))
66 $tokenizer->skipWhiteSpace();
67 $tokenizer->nextToken();
68 $tokenizer->skipWhiteSpace();
71 if ($tokenizer->testUpperText(
'USING'))
73 $tokenizer->skipWhiteSpace();
74 $indexType = $tokenizer->getCurrentToken()->text;
75 if (strtoupper($indexType) !==
'GIN')
80 $tokenizer->nextToken();
81 $tokenizer->skipWhiteSpace();
86 if ($tokenizer->testText(
'('))
88 $tokenizer->skipWhiteSpace();
89 $token = $tokenizer->getCurrentToken();
90 $level = $token->level;
94 if ($token->text ===
',')
96 $index->addColumn($column);
101 $column .= $token->text;
103 $token = $tokenizer->nextToken();
105 while (!$tokenizer->
endOfInput() && $token->level >= $level);
109 $index->addColumn($column);
112 if (!$tokenizer->testText(
')'))
118 $tokenizer->skipWhiteSpace();
119 if ($tokenizer->testText(
'USING'))
121 $tokenizer->skipWhiteSpace();
122 $token = $tokenizer->nextToken();
123 $index->using = $token->text;