* Fix table alias parsing regression
* Revert "Support redshift's columns definition list for system information functions (#769)"
This reverts commit c35dcc93a7.
* parsing of redshift's column definition list for
pg_get_late_binding_view_cols
pg_get_cols
pg_get_grantee_by_iam_role
pg_get_iam_role_by_user
* Renamed ColsDefinition to TableAliasDefinition
added generic dialect
* Tests fixed
* Visitor for IdentPair
* Parsing redshift table alias based on indentifier and
parentheses instead of function name
* fix clippy
---------
Co-authored-by: Maciej Skrzypkowski <maciej.skrzypkowski@satoricyber.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
postgres supports a bunch more json operators. See
https://www.postgresql.org/docs/15/functions-json.html
Skipping operators starting with a question mark for now, since those
are hard to distinguish from placeholders without more context.
Postgres supports more generalized locking clauses, for example:
FOR UPDATE OF <table_name> SKIP LOCKED
also, multiple locking clauses. Generalize the parser to support these.
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* support basic pg CREATE FUNCTION
Signed-off-by: Runji Wang <wangrunji0408@163.com>
* support function argument
Signed-off-by: Runji Wang <wangrunji0408@163.com>
* fix display and use verify in test
Signed-off-by: Runji Wang <wangrunji0408@163.com>
* support OR REPLACE
Signed-off-by: Runji Wang <wangrunji0408@163.com>
* fix compile error in bigdecimal
Signed-off-by: Runji Wang <wangrunji0408@163.com>
* unify all `CreateFunctionBody` to a structure
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
* Adapt VALUES to MySQL dialect
* Update src/ast/query.rs
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* remove *requirement* for ROW
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* Apply UPDATE SET FROM statement for some dialects
* Add GenericDialect to support
* Test SnowflakeDialect
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* Update SetOperation field all to op_option
* Implement parse_set_operator_option
cargo fmt
Fix parse_set_operator_option after next_token
* Add test for parsing union distinct
* Rename to SetQualifier and fix fmt space
* Add None to SetQualifier
* Update parse method
* Rename to SetQuantifier
* Rename parse_set_operator_option parse_set_operator
* Fix test to parse union, except, intersect
* Add some comments to SetQuantifier
* Fix comment
* 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>