Commit graph

752 commits

Author SHA1 Message Date
Dmitry Patsura
f5980cd30f
feat: Support KILL statement (#479) 2022-05-02 14:04:33 -04:00
yuval-illumex
7732c34b19
Add support in IS boolean filter (#474)
* Add support in IS TRUE IS FALSE

* Fix lint

* Add test for is false
2022-05-02 14:02:28 -04:00
Maciej Obuchowski
525ba527bb
snowflake: add qualify expression (#465)
Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
2022-04-29 14:11:11 -04:00
Andrew Lamb
edad20cbb8
Add negative tests for POSITION (#469) 2022-04-25 07:21:06 -04:00
yuval-illumex
8f4f01e517
Add Support in the "Position" Function (#463)
* Add support in the position function

* Add Test

* Add lint fixes

* Remove if

* Change from to in

* Remove special method for position

* Fix lint

* PR Review
2022-04-25 06:32:16 -04:00
Andrew Lamb
d2487445b7
Add negative test for IN parsing (#468) 2022-04-24 06:48:31 -04:00
George Andronchik
0924870d11
Support global,local, on commit for create temporary table (#456)
* feat: add global,local / on commit for create temp tables

* chore: minor refactor

* chore: clippy fix
2022-04-22 07:58:39 -04:00
yuval-illumex
278345d21a
Add support of NVARCHAR data type (#462)
* Add support of nvarchar data type

* Change the format type with capitals

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* Add Test

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2022-04-20 17:25:50 -04:00
Poonai
d035784bdf
Add support for postgres json operators ->, ->>, #>, and #>> (#458)
* add support for postgres json selection

Signed-off-by: password <rbalajis25@gmail.com>

* fix clippy

Signed-off-by: password <rbalajis25@gmail.com>

* add support for postgres `#>` and `#>>` json operator

* fix clippy

Signed-off-by: poonai <rbalajis25@gmail.com>

* resolve comments

Signed-off-by: password <rbalajis25@gmail.com>
2022-04-19 15:46:56 -04:00
slhmy
8f207db059
Support 'SET ROLE' statement (#455) 2022-04-13 14:45:53 -04:00
Andrew Lamb
7480e89f7b (cargo-release) version 0.16.0 2022-04-03 07:05:16 -04:00
Andrew Lamb
f125a287b5
Update changelog for 0.16.0 (#452) 2022-04-03 07:04:07 -04:00
Runji Wang
bfd416d978
Add support for more postgres COPY options (#446)
* implement parsing COPY statement

* support COPY option syntax before PostgreSQL version 9.0

Signed-off-by: Runji Wang <wangrunji0408@163.com>

* update COPY tests

Signed-off-by: Runji Wang <wangrunji0408@163.com>

* improve docs for COPY

Signed-off-by: Runji Wang <wangrunji0408@163.com>

* test and fix AS in COPY

Signed-off-by: Runji Wang <wangrunji0408@163.com>

* recover original test cases

* fix cargo clippy
2022-04-03 06:37:12 -04:00
slhmy
fd8f2df10d
Support Update Set From statement (#450) 2022-04-02 06:34:59 -04:00
Matthew Turner
803fd6c970
Add CREATE DATABASE test and parsing (#451)
* Add test

* Fix CreateDatabse parsing

* Linting

* Cleanup for code style
2022-04-01 13:32:38 -04:00
Maciej Obuchowski
d38c30e9ff
add SELECT INTO statement variation (#447)
Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
2022-03-30 16:01:55 -04:00
Matthew Turner
b68e9a3801
Add support for COPY TO (#441)
* Start adding COPY TO

* Fix statement and add tests

* Merge copy statements

* Remove extra line

* Clippy

* Cleanup
2022-03-22 18:21:44 -04:00
Poonai
12a3e97ef3
add support for SAVEPOINT statement (#438) 2022-03-13 03:29:26 -04:00
Simon Liu
497a3b0e1b
Fixed the bug that the access parsing is wrong when multiple query conditions contain arrays or map. (#433) 2022-03-12 14:29:37 -05:00
Maciej Obuchowski
6b55e51101
add support for MERGE statement (#430)
* add support for MERGE statement

Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>

* fix lint errors

Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
2022-03-12 14:28:57 -05:00
Yang Jiang
c688bbb4de
extract operator: add support for week keywords (#436) 2022-03-12 14:17:56 -05:00
Andrew Lamb
481551c075 (cargo-release) version 0.15.0 2022-03-08 13:41:26 -05:00
Andrew Lamb
ad1979146d
Update changelog for 0.15.0 (#431)
* Update changelog for 0.15.0

* Add late breaking additions
2022-03-08 13:34:34 -05:00
Andrew Lamb
a28bbcd74c
Allow array to be used as a function name again (#432)
* Allow `array` to be used as a function

* clarify code, add docstrings

* fix docs

* cleanup

* fmt
2022-03-08 13:25:48 -05:00
Simon Liu
3f5619446f
Support for ClickHouse array types (e.g. [1,2,3]) (#429) 2022-03-08 11:44:32 -05:00
Wataru Kurashima
994b86a45c
mysql unsigned datatype (#428)
* support MySQL UNSIGNED

* fix: 🐛 `unsigned` is not column option

* test: 💍 add `unsigned` test

* fix: 🐛 `unsigned` is not column option

* feat: 🎸 declare unsigned data_types

* feat: 🎸 display unsigned

* fix: 🐛 unsigned is not column type option

* feat: 🎸 parse_data_type can parse unsigned

* feat: 🎸 int or decimal or float is unsigned selectable

* fix: 🐛 FLOAT/DOUBLE/DECIMAL + UNSIGNED is not recommended

https://dev.mysql.com/doc/refman/8.0/en/numeric-type-attributes.html

* test: 💍 add test

* style: 💄 fmt
2022-03-07 17:01:48 -05:00
Maciej Obuchowski
3af3ca07b6
extract operator: add support for Postgres keywords (#427)
Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
2022-03-07 10:03:28 -05:00
Yoshiyuki Komazaki
0d1c5d1205
Support IN UNNEST(expression) (#426)
* feat: support `IN UNNEST(expression)`

* Add test for NOT IN UNNEST
2022-03-01 08:53:01 -05:00
Wataru Kurashima
2ebe18a94e
Support COLLATION keywork on CREATE TABLE (#424)
* support table definition's collate

* add table collate test
2022-02-28 14:04:47 -05:00
Maximilian Roos
b5f37118f1
Update doc reference to Query (#423)
* Update doc reference to Query

I guess it used to be called SQLQuery?
2022-02-28 14:04:09 -05:00
Eli Flanagan
c1703899a7
ci: remove Travis CI (#421)
Removing "dead code"
2022-02-28 14:04:00 -05:00
flaneur
b14c0d5657
add role keyword (#422) 2022-02-28 13:43:48 -05:00
gamife
0b5178d7e7
feat: add FOR UPDATE/FOR SHARE clause (#418)
* feat: add FOR UPDATE/FOR SHARE clause

* refactor: LockType enum variant name

Co-authored-by: gamife <gamife9886@gmail.com>
2022-02-24 06:39:38 +01:00
gamife
899f91b1f6
feat: add arg placeholder (#420)
Co-authored-by: gamife <gamife9886@gmail.com>
2022-02-17 07:55:21 -05:00
gamife
1da49c15c7
Support array expressions such as ARRAY[1,2] , foo[1] and INT[][] (#419)
* feat: add array expression

* test: add back the the existing test

Co-authored-by: gamife <gamife9886@gmail.com>
2022-02-17 07:21:11 -05:00
Andrew Lamb
0d6386e4a3 (cargo-release) version 0.14.0 2022-02-09 09:29:52 -05:00
Andrew Lamb
254e5d1b1e
Update changelog for 0.14 release (#417)
* Update changelog for 0.14 release

* Add other changelog items
2022-02-09 09:27:09 -05:00
Andrew Lamb
d7f4f1aac9
Support MySQL style LIMIT X, Y (#415) 2022-02-09 06:44:51 -05:00
Andrew Lamb
2072ef2031
Clarify maintenance status on README (#416)
* Clarify maintenance status on README

* update review policy

* add a note about error tests
2022-02-09 06:41:51 -05:00
Andrew Lamb
ff558eeb61
Add Expr::tuple + parsing (#414) 2022-02-08 10:54:27 -05:00
Evgeny
8a3544abae
Fix panic with GRANT/REVOKE in CONNECT, CREATE, EXECUTE or TEMPORARY (#401)
* fix inconsistency between parse_grant_permissions and matched keywords

* Make it clear the error is an internal problem

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2022-02-08 10:50:55 -05:00
tvallotton
c4cbc8340a
Support DROP CONSTRAINT [ IF EXISTS ] <name> [ CASCADE ] (#396)
* adding support for DROP CONSTRAINT [ IF EXISTS ] <name>

* implementing [ CASCADE ] for DROP CONSTRAINT
2022-02-08 10:34:09 -05:00
Jakob Truelsen
e4959696b5
Support CHARSET and ENGINE clauses on CREATE TABLE for mysql (#392)
* Add support for SET and ENUM types

See https://dev.mysql.com/doc/refman/8.0/en/set.html
and https://dev.mysql.com/doc/refman/8.0/en/enum.html

* Add support for mysql ENGINE and DEFAULT CHARSET in CREATE TABLE

See https://dev.mysql.com/doc/refman/8.0/en/create-table.html

* Add support for COMMENT and CHARACTER SET field attributes

See https://dev.mysql.com/doc/refman/8.0/en/create-table.html
2022-02-08 10:08:56 -05:00
Markus Westerlind
34fedf311d
fix: Handle double quotes inside quoted identifiers correctly (#411)
* fix: Handle double quotes inside quoted identifiers correctly

This fixes #410 for standard SQL, however I don't know enough about other dialects to know if they
handle this differently. May need more extensive testing as well.

* refactor: Make quoted identifier parsing a seperate function

* test: Check that quoted identifier tokenization works

Added `pretty_assertions` so that the `assert_eq!` in the tokenization is readable

* test: Check that quoted identifiers work in mysql

* chore: cargo clippy
2022-02-07 10:05:17 -05:00
Poonai
2614576dbf
Add support for FROM <filename>, DELIMITER, and CSV HEADER options for COPY command (#409)
* add additional options for copy command

Signed-off-by: password <rbalajis25@gmail.com>

* cargo fmt

Signed-off-by: password <rbalajis25@gmail.com>
2022-02-07 06:33:28 -05:00
Andrew Lamb
33d4f27bfc
Support OFFSET LIMIT as well as LIMIT OFFSET (#413)
* Inital support in current_timestamp

* Support time functions

* Add Test

* Fix order of offset

* Merge from main

* Fix PR

* Update Test

* Do not allow repeated LIMIT or OFFSET

Co-authored-by: Yuval Shkolar <yuval@illumex.ai>
2022-02-05 07:46:53 -05:00
dependabot[bot]
87509f1dec
Update simple_logger requirement from 1.9 to 2.1 (#403)
Updates the requirements on [simple_logger](https://github.com/borntyping/rust-simple_logger) to permit the latest version.
- [Release notes](https://github.com/borntyping/rust-simple_logger/releases)
- [Commits](https://github.com/borntyping/rust-simple_logger/compare/v1.9.0...v2.1.0)

---
updated-dependencies:
- dependency-name: simple_logger
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2022-02-05 07:33:00 -05:00
Tao Wu
929ef2a4b8
fix: export all methods of parser (#397) 2022-02-05 07:26:09 -05:00
flaneur
d4e6ef597a
add SUPER keyword (#387) 2022-02-05 06:54:00 -05:00
Andrew Lamb
5cbf1e797a
Fix new clippy errors (#412) 2022-02-05 06:53:33 -05:00