forked from cornucopia-rs/cornucopia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cornucopia-rs#82 from Virgiel/new_parser
New parser
- Loading branch information
Showing
17 changed files
with
1,922 additions
and
593 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- Write your migration SQL here | ||
CREATE TABLE Syntax ( | ||
"trick:y" TEXT, | ||
price FLOAT | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
|
||
--:row CompactRow() | ||
--: row SpaceRow () | ||
--:param CompactField(a?,b?,c?) | ||
--:param SpaceField ( a? , b? , c? ) | ||
|
||
--simple comment | ||
|
||
--! select_compact | ||
SELECT * FROM clone; | ||
--! select_spaced | ||
SELECT * FROM clone ; | ||
|
||
-- spaced comment | ||
|
||
--!implicit_compact(name?,price?):(id?) | ||
INSERT INTO item (name, price, show) VALUES (:name, :price, false) RETURNING id; | ||
--! implicit_spaced ( name? , price? ) : ( id? ) | ||
INSERT INTO item (name, price, show) VALUES (:name, :price, false) RETURNING id; | ||
|
||
-- Multi line | ||
-- Comment | ||
|
||
--!named_compact Params:Row | ||
INSERT INTO item (name, price, show) VALUES (:name, :price, false) RETURNING id; | ||
--! named_spaced Params : Row | ||
INSERT INTO item (name, price, show) VALUES (:name, :price, false) RETURNING id; | ||
|
||
--! tricky_sql | ||
INSERT INTO syntax ("trick:y", price) VALUES ('this is not a bind_param\', :price); | ||
--! tricky_sql1 | ||
INSERT INTO syntax ("trick:y", price) VALUES ('this is not a :bind_param', :price); | ||
--! tricky_sql2 | ||
INSERT INTO syntax ("trick:y", price) VALUES ('this is not a '':bind_param''', :price); | ||
--! tricky_sql3 | ||
INSERT INTO syntax ("trick:y", price) VALUES ($$this is not a :bind_param$$, :price); | ||
--! tricky_sql4 | ||
INSERT INTO syntax ("trick:y", price) VALUES ($tag$this is not a :bind_param$tag$, :price); | ||
--! tricky_sql6 | ||
INSERT INTO syntax ("trick:y", price) VALUES (e'this is not a '':bind_param''', :price); | ||
--! tricky_sql7 | ||
INSERT INTO syntax ("trick:y", price) VALUES (E'this is not a \':bind_param\'', :price); | ||
--! tricky_sql8 | ||
INSERT INTO syntax ("trick:y", price) VALUES (e'this is ''not'' a \':bind_param\'', :price); | ||
--! tricky_sql9 | ||
INSERT INTO syntax ("trick:y", price) VALUES (E'this is \'not\' a \':bind_param\'', :price); | ||
|
||
--! syntax | ||
SELECT * FROM syntax; | ||
|
||
|
||
-- Multi | ||
|
||
-- Comment |
Oops, something went wrong.