tree-sitter-sql
tree-sitter-sql copied to clipboard
CREATE OR REPLACE ignores OR REPLACE
Given the following SQL:
CREATE OR REPLACE VIEW geo_state AS
SELECT geom FROM geoheader;
the parser produces:
source_file (0, 3) - (3, 0)
create_view_statement (0, 3) - (1, 26)
CREATE (0, 3) - (0, 9) "CREATE"
VIEW (0, 21) - (0, 25) "VIEW"
identifier (0, 26) - (0, 35) "geo_state"
view_body (0, 36) - (1, 26)
AS (0, 36) - (0, 38) "AS"
select_statement (1, 0) - (1, 26)
select_clause (1, 0) - (1, 11)
SELECT (1, 0) - (1, 6) "SELECT"
select_clause_body (1, 7) - (1, 11)
identifier (1, 7) - (1, 11) "geom"
from_clause (1, 12) - (1, 26)
FROM (1, 12) - (1, 16) "FROM"
identifier (1, 17) - (1, 26) "geoheader"
; (1, 26) - (1, 27) ";"
There's no node corresponding to OR REPLACE.