Commit Graph

143 Commits

Author SHA1 Message Date
tibotix ff11a2a757
Add trailing commas for readability 2023-11-17 18:04:21 +01:00
tibotix deaf58c5fb
Add/Update TestCases for all introduced changes 2023-11-17 01:49:37 +01:00
tibotix f128f05e1e
Add MultiColumnSetComponent to support column-name-list update syntax
This commit refactors the SetComponent into an abstract interface and introduces
two separate classes `SingleColumnSetComponent` and `MultiColumnSetComponent`, as
well as related methods such as `visitSingleColumnSetComponent` / `visitMultiColumnSetComponent`.
All Visitors were updated accordingly, and logic for parsing / type-resolving / linting were added
too. The only thing missing is type-resolving for the case where rowValue is of type SubQuery,
i.e.

`UPDATE demo SET (a,b)=(SELECT 2,3)`.
2023-11-17 01:42:39 +01:00
Simon Binder 559cf986a1
sqlparser: Support `ORDER BY` in functions 2023-10-24 22:32:39 +02:00
Simon Binder 7f0488056c
Add more tests for custom types 2023-10-07 21:52:48 +02:00
Simon Binder 83885791c7
Fix parser crashes around `CREATE` 2023-08-12 22:33:54 +02:00
Simon Binder 0ed132f642
Fix crash at trailing comma in FROM clause 2023-08-09 15:24:10 +02:00
Simon Binder cc83a58d89
Report invalid statements in parseMultiple 2023-07-21 21:07:55 +02:00
Simon Binder 625eacf5f1
Add parseMultiple API to sqlparser (#2519) 2023-07-16 00:29:29 +02:00
Simon Binder 6bb2c3d2c5
Support named constructors for rows in drift file 2023-04-23 16:21:31 +02:00
Simon Binder 11b563f9de
Add static analysis for the `IIF` function (#2392) 2023-04-18 12:42:51 +02:00
Simon Binder a988b38ec1
Improve error message for invalid column name 2023-04-16 18:37:34 +02:00
Simon Binder 99abaae2f1
Fix infinite loop in trigger parser 2023-04-14 11:47:15 +02:00
Simon Binder e2136236d9
Improve error messages for keyword functions 2023-02-08 10:52:48 +01:00
Simon Binder bc325dd31c
Support cast to drift-specific types 2023-01-06 15:10:03 +01:00
Simon Binder e562cb9d21
Support type converters in queries 2023-01-05 23:04:36 +01:00
Simon Binder 6e173e8c08
Don't require tokens for some AST classes 2022-12-30 20:46:18 +01:00
Simon Binder 20aff8a9db
Begin with existing types for queries 2022-12-26 19:17:17 +01:00
Simon Binder 387a21c580
Relax constraints on element order in drift files 2022-12-03 00:06:05 +01:00
Simon Binder 8f6878292a
Migrate to `package:lints` 2022-08-13 23:33:05 +02:00
Simon Binder 098fcc2d1b
Parse new join kinds from sqlite 3.39 2022-05-26 23:23:02 +02:00
Simon Binder d330c9b001
sqlparser: Support new syntax for `IS` expressions 2022-05-26 22:24:41 +02:00
Simon Binder da212944ff
Replace old website and repository links 2022-03-13 15:52:15 +01:00
Simon Binder c9e22bf8d2
Parse non-window aggregate expressions 2022-03-08 10:58:40 +01:00
Simon Binder 93d328f056
Rename `moor` to `drift` in `sqlparser` 2022-02-26 21:38:28 +01:00
Daniel Brauner ca8482be71 add LIST parsing to the sqlparser 2022-01-17 15:43:36 +01:00
Daniel Brauner 0e331933af Add rename support for nested star columns 2022-01-17 10:21:06 +01:00
Simon Binder 19bd92bfd9
Remove redundant imports 2021-12-09 14:10:51 +01:00
Simon Binder c844c86af4
Support signed numbers as a default value 2021-12-01 21:07:47 +01:00
Simon Binder f2d0864890
Support generated columns in the parser 2021-11-07 22:10:08 +01:00
Simon Binder 40bc3a17bb
Organize imports 2021-09-10 11:43:21 +02:00
Simon Binder 07cba75ea8
Parse transaction blocks 2021-09-09 18:05:03 +02:00
Simon Binder 3be320d0c5
Parse BEGIN and COMMIT statements 2021-09-08 22:53:57 +02:00
Simon Binder 074b663b79
Parse "STRICT" table definitions 2021-08-28 16:32:00 +02:00
Simon Binder aa75cbaa19
Prepare parser for schema support 2021-07-22 21:32:53 +02:00
Simon Binder 6988d79f09
Fix tests 2021-06-15 22:38:36 +02:00
Simon Binder 0775c093e3
Initial support for custom data classes for views 2021-06-10 21:54:57 +02:00
Simon Binder a9efe7f371
Add test to parse required without name 2021-06-01 21:41:41 +02:00
Simon Binder e1d633526b
Refactor custom table information in sqlparser 2021-05-25 18:46:10 +02:00
Simon Binder bc2a2b4d61
Support existing data classes for moor tables 2021-05-11 22:01:51 +02:00
Simon Binder 258512e044
Support dart placeholders for inserts 2021-05-06 22:35:57 +02:00
Simon Binder 17f43bc9fc
Parse RAISE expressions (#1154) 2021-04-21 20:29:50 +02:00
Simon Binder 67f7e269e0
Lift parser.dart out of singleton dir 2021-04-21 19:59:18 +02:00
Simon Binder 602212f99d
Support REQUIRED annotation for query vars 2021-04-13 22:14:12 +02:00
Simon Binder b9b7f407c9
Parse RETURNING clauses 2021-03-13 20:41:14 +01:00
Simon Binder 687263dd66
Analysis support for generalized upserts 2021-03-13 16:07:12 +01:00
Simon Binder c9f8af346d
Parse more than ON CONFLICT clause 2021-03-13 15:21:27 +01:00
Simon Binder b110773053
Support MATERIALIZED / NOT MATERIALIZED 2021-03-13 14:00:06 +01:00
Simon Binder 3000cb2e44
Parse FROM clauses for update statements 2021-03-13 12:02:35 +01:00
Hossein Yousefi c0fc691a94 view analyzer class added 2021-02-11 18:38:41 +01:00