* 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>
* first commit
* fix style and edit test
* fix test?
* remove unnecessary logic
* refactor implementation
* codestyle
* add schema support
* codestyle and lint
* Apply suggestions from code review
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* PartialOrd and Ord
* clean up parser logic
* codestyle and lint
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* 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>
* add set time zone sometimezone as a exception while parsing keyword::set
* remove redundant parentheses
* add Statement::SetTimeZone
* delete useless comments
* 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>
* Support parse json in snowflake
* MR Review
* Lint
* Try to fix right as value
* Fix tests
* Fix lint
* Add generic dialect
* Add support in key location
Theoretically the behavior should be the same as CREATE INDEX, but we
cannot make that assumption, so the parse is (almost) identical as the
input.
Breaking changes:
- Now HASH and BTREE are KEYWORDS, and using them as names can result in
errors.
- Now 'KEY' and 'INDEX' column names start the parsing of a table constraint if unquoted for the Generic dialect. This results in possible conficts if canonical results are compared for all dialects if a column is named 'key' without quotes.
* 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
* support ceil/floor to datetime
* Update mod.rs
* Update parser.rs
* murphys law
* Update sqlparser_common.rs
* possible fix?
* remove question mark
* ceil to floor
* Update mod.rs
* Apply suggestions from code review
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* refactor into parse_ceil_floor_expr
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* 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>
sqlparser can now parse all the prepared statement placeholders supported by SQLite:
- ?
- ?NNN
- @VVV
- :VVV
- $VVV
See: https://www.sqlite.org/lang_expr.html#varparam
This does not break existing support for postgresql's '@' operator
Fixes#603
* National string literal with lower case n
It's used by Snowflake
* Corrected DB name
Co-authored-by: Maciej Skrzypkowski <maciej.skrzypkowski@satoricyber.com>