Fix table definitions like this...
CREATE TABLE [player_tech_branches]
(
[from_id] INTEGER NOT NULL REFERENCES [techs](id),
[to_id] INTEGER NOT NULL REFERENCES [techs](id),
UNIQUE ([from_id], [to_id]) PRIMARY KEY ([from_id], [to_id])
)
...where there are multiple keys which are not separated by commas.
This partially fixed EoD's database in issue #63.
Allow ON INSERT in foreign key clauses like this:
CREATE TABLE x
(
y INTEGER REFERENCES ref(id) ON INSERT CASCADE
)
Note that ON INSERT is allowed by SQLite but missing in the SQLite
documentation.
This partially fixes EoD's problem in issue #63.
Parse column constraints with a 'NOT LIKE' expression correctly. For
example in a table definition like this:
CREATE TABLE not_working(
value TEXT CONSTRAINT "value" CHECK(value NOT LIKE "prefix%")
);
This fixes issue #40.
fixes issue #34
IN wasn't added to the token list and not enabled in the suffix expression
as this gives a parser generator warning, because of an ambiguity with IN as an operator
we stick with the warning right now
Allow NULL constraints in a column definition when parsing a CREATE
TABLE statement. Before this only NOT NULL constraints were parsed
correctly even though NULL is proper SQL as well - it's just a redundant
information.
Since version 3.8.2 SQLite supports tables without the internal rowid
column added to the table. For these tables the primary key serves as a
replacement for the rowid column.
These changes update the grammar parser to correctly handle 'without
rowid' tables and also generate 'without rowid' SQL statements.
There is also a "create table" ast walker which fills
info for the new sqlitetype objects.
A dependency to the antlr2 runtime was added.
The grammar most probably still contain bugs.
Why all this?
First writing grammars is fun and this is the only way
we can get all information for proper table editing + some time
in the future when the grammar is finished we can provide real
auto completion.