Commit Graph

56 Commits

Author SHA1 Message Date
Simon Binder 43b7f72bad
sqlparser: Fix parsing binary literals 2024-04-06 14:48:55 +02:00
Simon Binder 29303100b8
Support custom names for drift views 2024-03-08 18:14:48 +01:00
Simon Binder 08ceb939bc
Include `NULL` constraints in node->sql 2023-12-12 21:46:58 +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 28e44cbea8
First support for MariaDB in compiled queries 2023-07-27 11:16:58 +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 deb1b91d41
Escape postgres keywords in generated SQL 2023-02-05 14:28:19 +01:00
Simon Binder 7175b83d2b
Add missing space when formatting window functions 2023-01-20 18:14:37 +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 f13fb4e218
Analyze existing row types for queries 2022-12-27 17:04:38 +01:00
Simon Binder 20aff8a9db
Begin with existing types for queries 2022-12-26 19:17:17 +01:00
Simon Binder 292dd9946d
Port more tests over to new analyzer 2022-10-29 17:30:18 +02:00
Simon Binder 81679b8ff1
Fix formatting some Dart placeholders 2022-10-23 18:13:40 +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
Daniel Brauner 5380a18450 Minor bug fixes 2022-04-06 20:14:13 +02: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
Simon Binder 6bb870458f
Analysis for sqlite 3.38 2022-02-23 22:06:42 +01:00
Simon Binder 518fdce2e9
Add parentheses around conflict target (#1704) 2022-02-21 18:43:48 +01:00
Simon Binder 1d1d0c783a
Fix CI test failures 2022-01-29 21:50:33 +01:00
Simon Binder 3d0a29fe77
Remove uncessary space 2022-01-28 22:04:24 +01:00
Simon Binder 6b6cd30a0c
Move nested query analysis to drift_dev 2022-01-28 21:55:03 +01:00
Daniel Brauner a9fd12e565 Fixed 0 workaround 2022-01-23 17:08:32 +01:00
Daniel Brauner d74860ec49 Add support for nested query variables 2022-01-18 22:21:54 +01:00
Simon Binder 19bd92bfd9
Remove redundant imports 2021-12-09 14:10:51 +01:00
westito fad654a5aa
PostgreSQL support (#1507)
Support PostgreSQL as a dialect in the main package and with an implementation provided in another package.

Co-authored-by: Simon Binder <oss@simonbinder.eu>
2021-11-11 14:40:41 +01:00
Simon Binder f2d0864890
Support generated columns in the parser 2021-11-07 22:10:08 +01:00
Simon Binder 07cba75ea8
Parse transaction blocks 2021-09-09 18:05:03 +02:00
Simon Binder 16bc11540b
Introduce single visitor method for moor-specific nodes 2021-09-08 23:20:45 +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 e1d633526b
Refactor custom table information in sqlparser 2021-05-25 18:46:10 +02:00
Simon Binder 258512e044
Support dart placeholders for inserts 2021-05-06 22:35:57 +02:00
Simon Binder 1de5479d60
Add explicit aliases with new codegen 2021-05-04 21:00:28 +02:00
Simon Binder 17f43bc9fc
Parse RAISE expressions (#1154) 2021-04-21 20:29:50 +02:00
Simon Binder 602212f99d
Support REQUIRED annotation for query vars 2021-04-13 22:14:12 +02:00
Simon Binder eb39738460
Initial support for RETURNING in the generator 2021-03-30 23:24:28 +02:00
Simon Binder 5ce5a48cff
Prefer a space after a closing ) in functions 2021-03-23 19:31:55 +01: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
Simon Binder 76e6d2d219
Fix whitespace handling in new SQL generator 2021-01-24 12:27:53 +01:00