* Creat sequence options model
[ INCREMENT [ BY ] increment ]
[ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
[ START [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
[ OWNED BY { table_name.column_name | NONE } ]
* Fix for format! not avalable in --target thumbv6m-none-eabi
* Fix for format! not avalable in --target thumbv6m-none-eabi
* Fix for format! not avalable in --target thumbv6m-none-eabi
* Fix for format! not avalable in --target thumbv6m-none-eabi
* Updated parser for sequence options
* Updated parser for sequence options
* Update src/ast/mod.rs
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* Add ObjectType Sequence
* Drop sequence test cases added.
* Parser and Drop statement Display updated.
* Parser and Drop statement Display updated.
* Fix compile errors
* add new test case
* 640 Fixing time zone printing format for TIMESTAMP and TIME
* 640 Removing unnecessary changes
* Update src/ast/data_type.rs
Fix comment typo
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* [postgres] Add support for custom binary operators
More details about operators in general are at:
https://www.postgresql.org/docs/current/sql-createoperator.html. This
patch attempts to parse `SELECT` queries that reference an operator
using `OPERATOR(<optional_schema>.<operator_name>)` syntax.
This is a PostgreSQL extension. There are no provisions for user-defined operators in the SQL standard.
* fix code-review comments and ci failures
* Allow custom operator in generic dialects too
* Parse `OPERATOR` as Vec<String>
* fix: std
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* Generalize EscapeSingleQuoteString to arbitrary quote character
* Fix escaping of trailing quote in quoted identifiers
* Add new tests instead of modifying existing tests
* add support for postgres composite types
Signed-off-by: password <rbalajis25@gmail.com>
* fix composite test for bigdecimal feature
Signed-off-by: password <rbalajis25@gmail.com>
* Redshift square bracket handling
We need to detect `[` or `"` for Redshift quotes around indentifier and at the same time exclude
treating JSON paths as indentifer
* RedshiftSqlDialect documentation update
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* Renamed _chars to chars
* Fixed warnings
* Missing license
Co-authored-by: Maciej Skrzypkowski <maciej.skrzypkowski@satoricyber.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* 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
* 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
* add support for snapshot id in set transaction
Signed-off-by: poonai <rbalajis25@gmail.com>
* add support for default session transaction characteristics
Signed-off-by: poonai <rbalajis25@gmail.com>
* add additional assertion for parse_set_transaction test
Signed-off-by: poonai <rbalajis25@gmail.com>
* Fix clippy
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
To share helper macros between various tests/* we added a new module
(tests/macros/mod.rs). This made the prologue to be used in tests quite
long and a little weird:
```
#[macro_use]
#[path = "macros/mod.rs"]
mod macros;
use sqlparser::test_utils::*;
```
This simplifies it to:
```
#[macro_use]
mod test_utils;
use test_utils::*;
```
- and switches all existing tests to the new prologue simultaneously...
...while fixing a few other inconsistencies and adding a few comments
about the way `test_utils` work.