Commit Graph

269 Commits

Author SHA1 Message Date
Simon Binder 788420b614
Avoid resolving all transitive imports in build 2023-08-12 14:35:16 +02:00
Simon Binder 29ba50a0ca
Merge pull request #2521 from BananaMasterz/develop
adding support for MariaDB dialect
2023-08-03 17:49:57 +02:00
Simon Binder 1a4ac27415
Find variables reliably 2023-08-01 11:20:05 +02:00
Simon Binder 2cca2f517e
Desugar duplicate variables 2023-07-31 23:47:41 +02:00
Simon Binder 525ab27006
Add `preamble` builder option 2023-07-30 23:14:32 +02:00
Simon Binder 8d3f490604
Add multi-dialect generation option 2023-07-26 23:59:06 +02:00
Simon Binder 5ed6115b0d
Fix outdated tests in drift_dev 2023-07-24 20:54:32 +02:00
Simon Binder 941409381b
Tests for generalized nested columns 2023-07-24 20:08:49 +02:00
Simon Binder 3f74d65e69
Support nested columns for any result set 2023-07-23 23:57:00 +02:00
Simon Binder b0946df3b7
Warn about implicitly added Dart tables 2023-07-05 20:51:30 +02:00
Simon Binder 8b7872fc67
Start with generator for all schema versions 2023-06-28 15:54:32 +02:00
Simon Binder 4411e0c459
Add `fatal_warnings` build option 2023-06-13 22:08:07 +02:00
Simon Binder e2fe4228ad
Make driver error fatal in tests 2023-05-30 13:53:03 +02:00
Simon Binder 451bc9c930
Load imports for Dart files too (#2433) 2023-05-23 15:58:15 +02:00
Simon Binder f5ae390284
Better mechanism to determine table count 2023-05-16 11:09:29 +02:00
Simon Binder a3ca77b5f8
Always write qualified column references from SQL 2023-05-16 10:51:33 +02:00
Simon Binder 1d63ccb3f1
Fix annotating top-level types and extensions
By not using a `SimpleIdentifier` AST node for class and extension
names, the code used to detect imports for Dart code was broken.
Closes #2423
2023-05-14 21:54:51 +02:00
Simon Binder 78299f30d3
Fix expectation in record writer test 2023-05-12 22:45:43 +02:00
Simon Binder 18868221d9
Support doc comments for columns in drift files 2023-05-10 12:00:44 +02:00
Simon Binder 6bb2c3d2c5
Support named constructors for rows in drift file 2023-04-23 16:21:31 +02:00
Simon Binder 5caa948243
Improve error handling for missing tables in query 2023-04-19 23:24:24 +02:00
Simon Binder d02343c8cc
Add regresion test for Dart component in having 2023-04-08 16:02:40 +02:00
Simon Binder a6549425ef
Serialize and restore file dependencies too 2023-03-25 16:29:07 +01:00
Simon Binder ba86f1aa89
Use correct variable indexes around nested queries 2023-03-15 17:48:36 +01:00
Simon Binder 26434ca40b
Fix typo in test that is now an error 2023-03-13 22:46:43 +01:00
Simon Binder 849f245f53
Warn about invalid custom foreign key constraint 2023-03-13 22:30:14 +01:00
Simon Binder e0d5520ee1
Analyze foreign keys as custom constraint on cols 2023-03-13 21:51:16 +01:00
Simon Binder cc16156c84
Merge branch 'postgres3' into develop 2023-02-25 13:16:33 +01:00
Fabian Freund dc9a9e2db3 fix parsing of nested cte's 2023-02-15 10:18:26 +01:00
Simon Binder 21ff422f19
Support `@create` queries in modular mode (#2313) 2023-02-12 12:44:47 +01:00
Simon Binder 6b216c1683
Fix expected import for Uint8List in test 2023-02-07 22:38:33 +01:00
Simon Binder cd2cf1f3b3
Fix blob columns with modular code generation (#2306) 2023-02-07 22:27:53 +01:00
Simon Binder deb1b91d41
Escape postgres keywords in generated SQL 2023-02-05 14:28:19 +01:00
Simon Binder ab10fd7f6f
Resolve columns sequentially 2023-02-01 10:50:20 +01:00
Simon Binder f9912d5455
Properly unify result classes with list columns 2023-01-31 22:58:30 +01:00
Simon Binder b935d27248
Add test for #2292 2023-01-31 22:25:58 +01:00
Simon Binder bff8d6c6a1
Fix nullability issues around record types 2023-01-27 17:12:49 +01:00
Simon Binder fe8611c5f4
Avoid unecessary async in lambda 2023-01-27 16:30:05 +01:00
Simon Binder b048ce44d4
Avoid writing suffix twice (#2281) 2023-01-27 16:15:44 +01:00
Simon Binder ef0cada32e
Merge queries with `LIST` columns 2023-01-23 21:46:51 +01:00
Simon Binder 2c63c1a64e
Update docs for Dart components in SQL
Scopes components are enabled by default, so the warning is no longer
necessary.
2023-01-22 22:53:45 +01:00
Simon Binder 53c14cd1aa
Modular: Fix extends for data classes (#2263) 2023-01-11 11:29:44 +01:00
Simon Binder c3cd2f2eeb
Fix `DataClassName` annotation with extending 2023-01-10 17:38:25 +01:00
Simon Binder 6b4a186b15
Fix extending classes in modular mode (#2260) 2023-01-10 12:26:14 +01:00
Simon Binder bbb19d59bb
Ignore abstract tables (#1955) 2023-01-08 15:54:16 +01:00
Simon Binder a6bede2aaa
Generate type converters for views 2023-01-06 17:16:18 +01:00
Simon Binder 1d7e656e30
Support cast to enum types 2023-01-06 16:53:04 +01:00
Simon Binder bc325dd31c
Support cast to drift-specific types 2023-01-06 15:10:03 +01:00
Simon Binder 20e6b0d5fe
Fix crash, support type converters in views 2023-01-06 14:27:15 +01:00
Simon Binder 259e4cfdd3
Remove unused import 2023-01-05 23:13:45 +01:00
Simon Binder e562cb9d21
Support type converters in queries 2023-01-05 23:04:36 +01:00
Simon Binder e52836694c
Fix view data class names for schema files 2023-01-02 23:22:50 +01:00
Simon Binder 9734aa56d1
Ignore existing row types on views for schema code 2023-01-02 23:02:14 +01:00
Simon Binder 4cd7616f24
Strip drift data class name from `CREATE VIEW` 2023-01-02 20:04:22 +01:00
Alexander Wilde 624c145cfd companions flag shouldn't depend on data classes flag 2023-01-01 20:17:40 +00:00
Simon Binder ebc1ba6899
Add test 2022-12-31 14:11:58 +01:00
Simon Binder d02deca36b
Fix tests 2022-12-27 21:08:41 +01:00
Simon Binder a463ee14cb
Support existing row classes in the generator 2022-12-27 18:14:02 +01:00
Simon Binder f13fb4e218
Analyze existing row types for queries 2022-12-27 17:04:38 +01:00
Simon Binder 1cbc02267d
Store existing analyzer type for tables and views 2022-12-27 12:49:24 +01:00
Simon Binder 649af15333
Analysis support for existing query row types 2022-12-27 00:15:47 +01:00
Simon Binder 44cae65170
Order all result columns syntactically 2022-12-26 22:45:35 +01:00
Simon Binder 20aff8a9db
Begin with existing types for queries 2022-12-26 19:17:17 +01:00
Simon Binder 338dd1316e
Support records as existing row types 2022-12-26 00:23:04 +01:00
Simon Binder c4fc5b8ada
Fix running post-process builder in test 2022-12-25 19:29:33 +01:00
Simon Binder 7b639f837a
Generate helper Dart file to serialize types 2022-12-25 19:10:48 +01:00
Simon Binder 22a3d3965c
Allow `autoIncrement` on `int64` columns (#2223) 2022-12-20 18:52:08 +01:00
Simon Binder 344d5611c6
Merge pull request #2220 from North101/develop
Validate enum default value in drift files
2022-12-20 00:11:47 +01:00
Simon Binder 1497d719b5
Extend check to all literal uses 2022-12-19 23:55:13 +01:00
Simon Binder e2265eb597
Add `DriftAny` type to wrap `ANY` in strit tables 2022-12-18 18:55:17 +01:00
Simon Binder b520568984
Ignore internal tables when reading schema from db 2022-12-18 15:26:40 +01:00
Simon Binder 0e395bbef3
Fix `JSON KEY` not working 2022-12-17 21:36:24 +01:00
Simon Binder 425878b712
Fix tests around custom constraints 2022-12-16 16:03:34 +01:00
Simon Binder 657b68ab76
Extract custom Dart table constraints into schema 2022-12-16 15:34:07 +01:00
Simon Binder 5f8b1e3358
Recognize database files when dumping schema data 2022-12-15 16:47:44 +01:00
Simon Binder 597d84db26
Fix import expectation 2022-12-13 22:04:35 +01:00
Simon Binder 00dbc2f886
Avoid nested codes, add tests 2022-12-13 21:53:17 +01:00
Simon Binder ec2b564611
Fox crash when serializing simple queries 2022-12-12 22:18:10 +01:00
Simon Binder b6cff50135
Parse custom constraints applied to columns 2022-12-11 00:06:45 +01:00
Simon Binder 6659d78ca7
Oops, fix compilation errors 2022-12-07 11:05:22 +01:00
Simon Binder dafa07a88a
Don't further analyze part files (#2185) 2022-12-05 17:59:51 +01:00
Simon Binder d60c775435
Merge pull request #2181 from ValentinVignal/column-name-case
Add the `column_name_case` option
2022-12-03 14:13:16 +01:00
Simon Binder d366cff9ee
Write utils for function stubs 2022-12-03 14:05:58 +01:00
ValentinVignal 5b7a9f487a
Update the tests 2022-12-03 16:16:25 +08:00
ValentinVignal 496635afb5
🚚 Rename column_name_case into case_from_dart_to_sql 2022-12-03 15:55:58 +08:00
ValentinVignal b08088ab1b
Merge remote-tracking branch 'upstream/develop' into column-name-case 2022-12-03 14:56:51 +08:00
Simon Binder 1a51dbf4d6
Static analysis support for custom functions 2022-12-02 23:34:42 +01:00
ValentinVignal d719b9598a
Test on column_name_case option 2022-12-01 23:26:51 +08:00
Alexander Wilde c80e6b6cbe Fix tests 2022-12-01 04:43:27 +00:00
Simon Binder 6503624ff1
Merge pull request #2168 from ValentinVignal/textEnum
Add `textEnum` column builder and `EnumNameConverter`
2022-11-30 22:07:54 +01:00
Simon Binder 061d9b2008
Use indirect import for test 2022-11-30 21:29:44 +01:00
ValentinVignal 3cfa69c9d9
:sparkles Add ENUMNAME type 2022-12-01 00:40:13 +08:00
ValentinVignal 0c35d30dcb
💡 Better test description 2022-12-01 00:00:54 +08:00
ValentinVignal 89aec378af
Merge remote-tracking branch 'upstream/develop' into textEnum 2022-11-30 23:55:25 +08:00
ValentinVignal b9892ece5c
Verify the EnumNameConverter is used 2022-11-30 23:55:04 +08:00
Simon Binder 267821804e
Add generator unit test for #2178 2022-11-30 16:26:22 +01:00
ValentinVignal 197a3862e7
Merge remote-tracking branch 'upstream/develop' into textEnum
# Conflicts:
#	drift_dev/CHANGELOG.md
#	drift_dev/pubspec.yaml
2022-11-30 22:47:58 +08:00
Simon Binder 0ee8a6a7f9
Fix code generation for triggers and indices 2022-11-29 10:39:45 +01:00
ValentinVignal 4030db4c5f
🎨 Better type comparison and matcher 2022-11-28 18:54:56 +08:00
ValentinVignal 432b68cf4e
Update the tests 2022-11-26 21:51:27 +08:00