Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly determine SQLite reserved keywords #92

Open
nene opened this issue Oct 26, 2024 · 0 comments
Open

Properly determine SQLite reserved keywords #92

nene opened this issue Oct 26, 2024 · 0 comments

Comments

@nene
Copy link
Owner

nene commented Oct 26, 2024

We're currently using the SQLite keywords list as the list of reserved keywords for SQLite. But not all of these keywords are actually fully reserved. Some can always be used as identifiers while others can be used in some contexts. One needs to go manually though all of them to classify them all properly.

  • ABORT
  • ACTION
  • ADD (R)
  • AFTER
  • ALL (R)
  • ALTER (R)
  • ALWAYS
  • ANALYZE
  • AND (R)
  • AS (R)
  • ASC
  • ATTACH
  • AUTOINCREMENT (R)
  • BEFORE
  • BEGIN
  • BETWEEN
  • BY
  • CASCADE
  • CASE
  • CAST
  • CHECK
  • COLLATE
  • COLUMN (Can mostly be used as identifier, except in ADD COLUMN, DROP COLUMN, RENAME COLUMN)
  • COMMIT
  • CONFLICT
  • CONSTRAINT
  • CREATE
  • CROSS
  • CURRENT
  • CURRENT_DATE
  • CURRENT_TIME
  • CURRENT_TIMESTAMP
  • DATABASE
  • DEFAULT
  • DEFERRABLE
  • DEFERRED
  • DELETE
  • DESC
  • DETACH
  • DISTINCT (R)
  • DO
  • DROP (R)
  • EACH
  • ELSE (R)
  • END
  • ESCAPE (R)
  • EXCEPT (R)
  • EXCLUDE
  • EXCLUSIVE
  • EXISTS (R)
  • EXPLAIN
  • FAIL
  • FILTER
  • FIRST
  • FOLLOWING
  • FOR
  • FOREIGN (R)
  • FROM (R)
  • FULL
  • GENERATED
  • GLOB
  • GROUP (R)
  • GROUPS
  • HAVING (R)
  • IF (R)
  • IGNORE
  • IMMEDIATE
  • IN (R)
  • INDEX (R)
  • INDEXED
  • INITIALLY
  • INNER
  • INSERT (R)
  • INSTEAD
  • INTERSECT (R)
  • INTO (R)
  • IS (R)
  • ISNULL (R)
  • JOIN (R)
  • KEY (Can always be an identifier. Only occurs as part of PRIMARY KEY or FOREIGN KEY)
  • LAST
  • LEFT
  • LIKE
  • LIMIT (R)
  • MATCH
  • MATERIALIZED
  • NATURAL
  • NO
  • NOT (R)
  • NOTHING (R)
  • NOTNULL (R)
  • NULL (R)
  • NULLS
  • OF
  • OFFSET
  • ON (R)
  • OR (R)
  • ORDER (R)
  • OTHERS
  • OUTER
  • OVER
  • PARTITION
  • PLAN
  • PRAGMA
  • PRECEDING
  • PRIMARY (R)
  • QUERY
  • RAISE
  • RANGE
  • RECURSIVE
  • REFERENCES (R)
  • REGEXP
  • REINDEX
  • RELEASE
  • RENAME
  • REPLACE
  • RESTRICT
  • RETURNING (R)
  • RIGHT
  • ROLLBACK
  • ROW
  • ROWS
  • SAVEPOINT
  • SELECT (R)
  • SET (R)
  • TABLE (R)
  • TEMP
  • TEMPORARY
  • THEN (R)
  • TIES
  • TO (R)
  • TRANSACTION (R)
  • TRIGGER
  • UNBOUNDED
  • UNION (R)
  • UNIQUE (R)
  • UPDATE (R)
  • USING (R)
  • VACUUM
  • VALUES (R)
  • VIEW
  • VIRTUAL
  • WHEN (R)
  • WHERE (R)
  • WINDOW
  • WITH
  • WITHOUT

I've tested them all using CREATE TABLE <keyword> (id INT). Those that caused a syntax error I labeled with (R). But it's not the whole story.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant