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

UNIQUE constraint not parsed correctly #249

Closed
guilhas07 opened this issue Apr 17, 2024 · 0 comments
Closed

UNIQUE constraint not parsed correctly #249

guilhas07 opened this issue Apr 17, 2024 · 0 comments

Comments

@guilhas07
Copy link
Contributor

I believe the following should be valid sql, but as you can see it isn't correctly parsed:

CREATE TABLE test (
    name TEXT UNIQUE
);
  (statement ; [0, 0] - [2, 1]
    (create_table ; [0, 0] - [2, 1]
      (keyword_create) ; [0, 0] - [0, 6]
      (keyword_table) ; [0, 7] - [0, 12]
      (object_reference ; [0, 13] - [0, 17]
        name: (identifier)) ; [0, 13] - [0, 17]
      (column_definitions ; [0, 18] - [2, 1]
        (column_definition ; [1, 4] - [1, 13]
          name: (identifier) ; [1, 4] - [1, 8]
          type: (keyword_text)) ; [1, 9] - [1, 13]
        (ERROR))))) ; [1, 14] - [1, 20]
guilhas07 added a commit to guilhas07/tree-sitter-sql that referenced this issue Apr 17, 2024
guilhas07 added a commit to guilhas07/tree-sitter-sql that referenced this issue Apr 17, 2024
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