Commit Graph

282 Commits

Author SHA1 Message Date
Simon Binder ee66465d47
Avoid leading underscores for local identifiers 2022-08-31 00:59:19 +02:00
Simon Binder 0242ce56ac
Start resolving drift tables in new analyzer 2022-08-30 23:58:36 +02:00
Simon Binder aae09c02b0
Simple tests for pre-analysis step 2022-08-30 22:50:07 +02:00
Simon Binder 2575f36e82
Merge branch 'develop' into modular-generation 2022-08-30 21:20:32 +02:00
Simon Binder b87e5cae0c
Drift-specific analysis for fts5 tables 2022-08-25 18:50:24 +02:00
Simon Binder b088537b81
Preprocess step for new analysis runner 2022-08-20 22:54:46 +02:00
Simon Binder 27ea49137d
Properly read options (#1992) 2022-08-16 16:05:08 +02:00
Simon Binder a21576e02c
Move schema validation test to drift_dev 2022-08-15 21:16:58 +02:00
Simon Binder a89cef5262
Delete old moor packages 2022-08-14 22:57:37 +02:00
Simon Binder 8f6878292a
Migrate to `package:lints` 2022-08-13 23:33:05 +02:00
Simon Binder 83c7c1ab43
Remove deprecated options, re-run build 2022-08-13 15:14:09 +02:00
Simon Binder b9a605ed25
Allow async mappings from SQL to row classes
When existing, custom row classes are used, drift now supports using a
(potentially asynchronous) static method to load them instead of just
a named constructor like before.
Tables are also changed to support the `map` method being async for
cases where that is needed. The same applies to custom queries which
may have to be async now.
2022-08-12 22:55:02 +02:00
Simon Binder 50a65b236a
Upgrade to latest analyzer 2022-08-06 22:11:44 +02:00
Simon Binder 8cc85de5f7
Improve error message for schema difference 2022-08-06 21:35:05 +02:00
Simon Binder 0cb3527680
Schema tool: Store whether dates are text 2022-07-26 19:18:17 +02:00
Simon Binder d79c7e07ba
Lints for probable text datetime misuses 2022-07-25 20:58:39 +02:00
Simon Binder 6c0e27b24c
SQL analysis for text datetimes 2022-07-24 19:19:18 +02:00
Simon Binder 867f8cbfed
Remove drift_dev's ColumnType 2022-07-21 21:12:55 +02:00
Simon Binder 3744fa0601
Merge branch 'develop' into refactor-type-system 2022-07-20 22:37:34 +02:00
Simon Binder 9325af9c0e
Fix another test in drift_dev 2022-07-19 23:23:43 +02:00
ValentinVignal 9bd2486c85 Add a test to make sure data classes and companion classes are using a const constructor 2022-07-19 23:21:05 +08:00
ValentinVignal aab2b38f21 ✏️ Fix typo 2022-07-19 09:54:10 +08:00
Simon Binder 1af6bb78d9
Start removing the SqlTypeSystem class 2022-07-12 17:04:01 +02:00
Simon Binder 388b31e9ea
Remove some moor references in drift_dev 2022-07-03 22:20:24 +02:00
Simon Binder 116f98269d
Always enable the new SQL generation mode 2022-07-03 21:53:17 +02:00
Simon Binder 6049d1aaa0
Add test for #1902 2022-07-01 22:56:25 +02:00
Simon Binder 52c07c9d3f
Remove support for non-nnbd code 2022-07-01 21:51:14 +02:00
Simon Binder bfad77788e
Handle nullable converters for compiled queries 2022-06-28 22:34:11 +02:00
Simon Binder 8a68527fee
Merge remote-tracking branch 'North101/develop' into develop 2022-06-23 21:01:07 +02:00
Simon Binder cf1e94d384
Automatically make some converters nullable 2022-06-23 20:56:56 +02:00
Alexander Wilde 345faa91c7 TypeConverter mapToDart -> fromSql, mapToSql -> toSql 2022-06-22 23:50:19 +01:00
Simon Binder 06af930941
Explicit null-aware types on type converters 2022-06-22 23:56:15 +02:00
Simon Binder 7be4e90569
Exclude internal tables from schema verification 2022-06-10 11:02:52 +02:00
Simon Binder df0f4c5e06
Adapt error message in expectation 2022-05-25 17:02:35 +02:00
westito 2cfd2b41a3 Fix test (Dart 2.17) 2022-05-12 22:02:58 +02:00
Simon Binder 5e3de2fb7c
Remove lint around binary expr types 2022-05-10 20:46:30 +02:00
Simon Binder 80c8c86031
Support drift-defined views schema tools (#1813) 2022-04-23 23:31:04 +02:00
Simon Binder d0694f9d65
Consistently format goldens in writer test 2022-04-23 20:09:54 +02:00
Simon Binder 8479602023
Pick valid Dart names for views (#1814) 2022-04-23 16:06:11 +02:00
Simon Binder 5f6beb76ca
Support json type converters (#1811) 2022-04-22 23:38:41 +02:00
Daniel Brauner 3c75fbee9d New test cases 2022-04-06 22:07:28 +02:00
Simon Binder 62a95f6bd4
Write Dart refences into schema files 2022-04-04 22:32:07 +02:00
Simon Binder a721e896d3
Add warnings for `customConstraint` misuse 2022-04-04 21:13:07 +02:00
Simon Binder 6047ec912f
Add changelog entry, expand docs a bit 2022-04-03 12:34:21 +02:00
Simon Binder 4e508b62ab
Test parsing unique keys 2022-04-03 12:28:12 +02:00
westito c584b5ccfd Fix failed analyze and test codes 2022-04-02 20:12:57 +02:00
Simon Binder 5a2b6a36cc
Fix crash when reading type converters (#1757) 2022-03-15 16:51:30 +01:00
Simon Binder a60a795c66
Auto-migrate usages of `moor_flutter` 2022-03-14 21:04:04 +01:00
Simon Binder da212944ff
Replace old website and repository links 2022-03-13 15:52:15 +01:00
Simon Binder b25921a362
Write column getter into schema file (#1739) 2022-03-09 23:02:52 +01:00
Simon Binder 56f048b42f
Add test for self-references in Dart tables 2022-03-08 09:54:50 +01:00
Simon Binder 61dc1f17b8
Name schema exports automatically (#1721) 2022-03-02 17:25:30 +01:00
Simon Binder 9ec7465fca
Migrate rest of `drift_dev` to null safety 2022-02-26 22:20:17 +01:00
Simon Binder 93d328f056
Rename `moor` to `drift` in `sqlparser` 2022-02-26 21:38:28 +01:00
westito 9bcac38e98 Add tests for custom data class parent 2022-02-18 10:50:03 +01:00
Simon Binder 36815c0b88
Merge pull request #1638 from LeFrosch/develop
Support for nested queries like (#1634)
2022-01-31 13:21:24 +01:00
Simon Binder 6b6cd30a0c
Move nested query analysis to drift_dev 2022-01-28 21:55:03 +01:00
Simon Binder fe0b976b92
Fix invalid use of alias in writer test 2022-01-26 22:12:32 +01:00
Daniel Brauner 2035bf0af9 Fix resultset name bug 2022-01-23 18:44:33 +01:00
Daniel Brauner e50ce8a8f7 Add linter for double nested queries and bug fixes 2022-01-20 20:21:06 +01:00
Simon Binder 2a347b2f40
Analyze views before other entities 2022-01-19 20:54:02 +01:00
Daniel Brauner 23de4c5cee Add code generation for nested result queries 2022-01-17 22:19:31 +01:00
Daniel Brauner 0e331933af Add rename support for nested star columns 2022-01-17 10:21:06 +01:00
Simon Binder 36b23942f4
Consider inheritance when checking for getters 2021-12-19 11:48:49 +01:00
Simon Binder 19bd92bfd9
Remove redundant imports 2021-12-09 14:10:51 +01:00
westito fc9c2d6171 Remove unnecessary import from virtual table test 2021-11-28 19:38:14 +01:00
westito b4b76c95bc Fix typo in virtual table unknown function test 2021-11-28 19:35:48 +01:00
westito 5d5518f2a4 Fix virtual table test 2021-11-28 19:33:31 +01:00
boyan b5d32ee21a fix unknown function cause crash 2021-11-26 13:08:26 +08:00
Simon Binder a00869a62b
Migrate .moor.dart files (#1558) 2021-11-24 23:11:59 +01:00
Simon Binder 214fbe2409
Don't crash for unknown column in PK 2021-11-19 15:43:50 +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 6bcb0070b0
Write explicitly inxed variables in new code 2021-10-19 18:15:53 +02:00
Simon Binder 4eb430c42f
Support foreign key references in Dart tables 2021-10-17 12:21:32 +02:00
Simon Binder 662b9d5721
Fix analysis plugin for moor, migrate options 2021-10-12 17:36:10 +02:00
Simon Binder aa8e3f7781
Migrate built_value example 2021-10-09 17:55:21 +02:00
Simon Binder dc5055f585
Improve UX of migrator 2021-10-09 16:30:46 +02:00
Simon Binder aa7a88172d
Fix generation for builds through moor_generator 2021-10-08 23:15:37 +02:00
Simon Binder 7358f545ac
Fix tests and generation in drift package 2021-10-08 22:40:58 +02:00
Simon Binder 3a56de1830
Fix imports in drift_dev 2021-10-08 22:01:18 +02:00
Simon Binder 2219a15e5f
Fix tests of main package, imports in dev 2021-10-08 21:51:01 +02:00
Simon Binder fcbef06b7c
Move generator to drift_dev 2021-10-08 18:10:48 +02:00