mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
grammar: proper support the index_column rule
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -363,7 +363,7 @@ tableconstraint
|
||||
|
||||
indexedcolumn
|
||||
:
|
||||
id (AUTOINCREMENT)?
|
||||
id (COLLATE collationname)? (ASC|DESC)? (AUTOINCREMENT)?
|
||||
;
|
||||
|
||||
conflictclause
|
||||
|
||||
@@ -320,6 +320,14 @@ Table CreateTableWalker::table()
|
||||
tab.fields().at(fieldindex)->setPrimaryKey(true);
|
||||
|
||||
tc = tc->getNextSibling();
|
||||
if(tc != antlr::nullAST
|
||||
&& (tc->getType() == sqlite3TokenTypes::ASC
|
||||
|| tc->getType() == sqlite3TokenTypes::DESC))
|
||||
{
|
||||
// TODO save ASC / DESC information?
|
||||
tc = tc->getNextSibling();
|
||||
}
|
||||
|
||||
if(tc != antlr::nullAST && tc->getType() == sqlite3TokenTypes::AUTOINCREMENT)
|
||||
{
|
||||
tab.fields().at(fieldindex)->setAutoIncrement(true);
|
||||
|
||||
Reference in New Issue
Block a user