tree-sitter-sql icon indicating copy to clipboard operation
tree-sitter-sql copied to clipboard

UNIQUE constraint not parsed correctly

Open guilhas07 opened this issue 1 year ago • 0 comments

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 avatar Apr 17 '24 13:04 guilhas07