Commit Graph

450 Commits

Author SHA1 Message Date
Simon Binder e1d633526b
Refactor custom table information in sqlparser 2021-05-25 18:46:10 +02:00
Simon Binder a46cc07ed4
Refactor column resolver in sqlparser
Fixes #1208
2021-05-21 17:47:14 +02:00
Simon Binder 473477e109 Fix code generation for custom data classes 2021-05-21 11:01:26 +02:00
Simon Binder 4bca48fd17
Support generating older data classes 2021-05-14 20:18:40 +02:00
Simon Binder 41eb6f4181
Avoid dynamic when overriding == 2021-05-14 18:50:29 +02:00
Simon Binder 50f5e14f76
Escape backslash in strings 2021-05-13 10:51:41 +02:00
Simon Binder bc2a2b4d61
Support existing data classes for moor tables 2021-05-11 22:01:51 +02:00
Simon Binder 2fe8151508
Generate null-safe migration tests if possible 2021-05-11 20:47:23 +02:00
Simon Binder 5f7c20d4eb
Allow named constructors in custom row classes 2021-05-09 12:42:02 +02:00
Simon Binder 258512e044
Support dart placeholders for inserts 2021-05-06 22:35:57 +02:00
Simon Binder 0e4541a987
Generate non-nullable nested result sets 2021-05-06 17:20:13 +02:00
Simon Binder b6a2fcd603
Copy list in transformChildren 2021-05-05 19:46:13 +02:00
Simon Binder 1de5479d60
Add explicit aliases with new codegen 2021-05-04 21:00:28 +02:00
Simon Binder c5d696a9eb
Report error when tables can't be read 2021-05-03 18:06:19 +02:00
Simon Binder 878af3add8
Support abstract tableName getter (#1172) 2021-05-03 12:31:20 +02:00
Simon Binder adb27d056b
Start phasing out SqlTypeSystem 2021-04-25 16:14:33 +02:00
Simon Binder 3d6537ccfb
Avoid deprecated analyzer apis 2021-04-21 20:39:08 +02:00
Simon Binder 8b5d5a9f6c
Check types for existing row classes 2021-04-20 22:34:11 +02:00
Simon Binder fd18984cae
Fix formatting issues in CI 2021-04-13 22:30:19 +02:00
Simon Binder 602212f99d
Support REQUIRED annotation for query vars 2021-04-13 22:14:12 +02:00
Simon Binder 51d5ada5c9
Fix moor files importing the original Dart source 2021-04-12 12:01:43 +02:00
Simon Binder 1e962312ca
Improve UX when importing part files (#1136) 2021-04-11 19:56:13 +02:00
Simon Binder 8d625cc13b
Initial documentation for custom row classes 2021-04-10 13:01:24 +02:00
Pavel e1f3242850 option to make all named parameters required 2021-04-10 01:19:26 +03:00
Simon Binder 6bbff77271
Rename to @CustomRowClass 2021-04-09 23:33:58 +02:00
Simon Binder 6682c1f909
Initial support for custom data classes 2021-04-09 22:59:41 +02:00
Simon Binder 133b7c652f
Fix generation for placeholders before arrays 2021-04-03 22:23:37 +02:00
Simon Binder eb39738460
Initial support for RETURNING in the generator 2021-03-30 23:24:28 +02:00
Simon Binder 401b4d3650
Fix reading nullable columns 2021-03-23 16:59:11 +01:00
Simon Binder ddbb3a2d67
Warn when using RETURNING for now 2021-03-18 16:35:51 +01:00
Simon Binder 613c7944c8
Generator option for target sqlite version 2021-03-16 21:45:21 +01:00
Simon Binder f677aac4d5
Migrate a few more file in moor_generator 2021-03-16 09:52:35 +01:00
Simon Binder c32ccac756
Upgrade to build 2.0 2021-03-16 09:47:09 +01:00
Simon Binder 7c911713de
Two more analysis errors around RETURNING 2021-03-13 22:25:39 +01:00
Simon Binder cf9ea89681
moor_generator: Support the math extension 2021-03-13 14:56:06 +01:00
Simon Binder 1b6c031aaa
Migrate migrations example to null-safety 2021-03-09 21:52:46 +01:00
Simon Binder f943576f5d
Migrate schema verification apis to null-safety 2021-03-09 21:37:39 +01:00
Simon Binder 8c7679568c
generator: Migration option parsing to null-safety 2021-03-09 21:33:54 +01:00
Simon Binder 65472a9e7d
Per-file nnbd opt-out in moor_generator 2021-03-09 21:27:25 +01:00
Simon Binder d279f1cdff
Support analyzer 1.x in moor_generator 2021-03-07 13:35:27 +01:00
Simon Binder dbc4bcffaa
Fix view generation and references 2021-03-01 11:54:46 +01:00
Simon Binder c0865e51fb
Avoid analyzing unfinished views 2021-02-11 22:03:25 +01:00
Hossein Yousefi c0fc691a94 view analyzer class added 2021-02-11 18:38:41 +01:00
Hossein Yousefi bf813cf67b added a test that fails 2021-02-10 22:47:39 +01:00
Hossein Yousefi c9269e13be added support for CREATE VIEW in .moor files 2021-02-10 16:23:51 +01:00
Simon Binder ca2be1bb6a
Add Dart default value to generated schema (#1018) 2021-01-27 22:10:34 +01:00
Simon Binder 821a1009cf
Also format generated SQL for schema entities 2021-01-26 14:33:33 +01:00
Simon Binder 76e6d2d219
Fix whitespace handling in new SQL generator 2021-01-24 12:27:53 +01:00
Simon Binder 4ba12c4868
Strip whitespace and comments from generated queries 2021-01-23 21:03:03 +01:00
Simon Binder 5ff74c7bcb
Improve table analysis, parse key ordering (#1007) 2021-01-18 14:44:05 +01:00
Peter Leibiger d54936df91
Only add nullable suffix on converter types when NNBD is active 2021-01-15 11:32:53 +01:00
Simon Binder 4575287ba4
Avoid InconsistentAnalysisException in preprocess builder 2021-01-14 23:23:34 +01:00
Simon Binder 43f90b6a43
Improve error messages when the preparing builder fails 2021-01-14 19:33:00 +01:00
Simon Binder b8eed2f75b
Make order by placeholders optional (#998) 2021-01-08 22:30:17 +01:00
Simon Binder db72da0f07
Use new build apis to load results (#959) 2020-12-29 22:22:32 +01:00
Simon Binder 1655bcc69f
Recognize withoutRowId in Dart tables (#972) 2020-12-17 19:49:08 +01:00
Simon Binder 6aa022e547
Add nullability hints, generate nullable variables 2020-12-14 18:35:19 +01:00
Simon Binder 5db10342b0
Fix nnbd generation around type converters (#968) 2020-12-14 15:13:59 +01:00
Simon Binder fea1692a6e
Support latest analyzer, use regular plugin package 2020-12-12 20:00:54 +01:00
Simon Binder 5eda201749
Remove legacy type inference 2020-12-12 19:55:43 +01:00
Simon Binder 42ba773422
Consequently upgrade dev version to 4.0.0 2020-12-07 21:30:15 +01:00
Simon Binder 47b8989318
More analyzer workarounds (#959) 2020-12-07 21:18:27 +01:00
Simon Binder 35d2d1fca8
Merge branch 'develop' into nnbd
# Conflicts:
#	moor/test/data/tables/custom_tables.g.dart
2020-12-04 20:01:22 +01:00
Simon Binder 0c075a2b44
Support overriding column getters and table classes (#932) 2020-11-23 20:01:31 +01:00
Simon Binder 01258d25ab
Fix nnbd code emitted by the generator 2020-11-19 14:06:51 +01:00
Simon Binder b2ef4ddbcf
Optionally generate named parameters (#918) 2020-11-16 17:03:22 +01:00
Simon Binder 6c913a4811
Support raw statements in migration tests (#909) 2020-11-14 12:26:01 +01:00
Simon Binder 708033c88c
Fix verifier migrating to the latest version 2020-11-12 21:41:45 +01:00
Simon Binder c7669a18a0
Fix more bugs in schema verification tests 2020-11-11 11:36:19 +01:00
Simon Binder 95dacd986c
Generate dontWriteConstraints for schema tests 2020-11-09 18:55:15 +01:00
Gustav Bylund 4eba4e7070 feat: add support for documentation comments 2020-10-28 00:43:56 +01:00
Simon Binder 71e5c4941e
Support comparing types with different names 2020-10-23 19:22:30 +02:00
Simon Binder 1c3ab61895
Generate nullable types for converters (#892) 2020-10-23 14:58:24 +02:00
Simon Binder ce37d15d2a
Generate nnbd code for inputs that have opted in 2020-10-17 14:31:04 +02:00
Simon Binder b0b3445574
Migrate query elements to new type interface 2020-10-17 13:18:59 +02:00
Simon Binder e4d985728a
Migrate to analyzer version 0.40 2020-10-16 19:25:10 +02:00
Simon Binder 7e88e74a6c
Add tests for schema verification, fix inconsistencies 2020-10-16 17:16:45 +02:00
Simon Binder 10620cf738
Start writing docs for schema migrations 2020-10-14 22:01:36 +02:00
Simon Binder cf537721cb
Add tools to generate old versions of a database 2020-10-14 21:15:17 +02:00
Simon Binder 3470d0485a
Add current_time_millis SQL function (#857) 2020-10-11 11:25:21 +02:00
Simon Binder d6a321ca3c
Add generate_values_in_copy_with build option (#795) 2020-09-01 13:34:02 +02:00
Simon Binder e510be34a3
Warn when using default values outside of expressions 2020-08-30 14:05:28 +02:00
Simon Binder 2ae2388878
Support default values for Dart placeholders (#753) 2020-08-30 13:48:47 +02:00
Simon Binder 527b9d731d
Plugin: Send request error for non-moor requests (#779) 2020-08-22 19:07:51 +02:00
Simon Binder 6fba2555c1
Api to turn AST nodes into a textual represenation 2020-08-21 16:44:17 +02:00
Simon Binder a037de6621
Support rowid resolution outside of selects
This fixes #754
2020-08-10 10:46:33 +02:00
Simon Binder cd61c5ad16
Generator: Fix duplicate code generation for table imports (#447) 2020-08-06 16:49:58 +02:00
Simon Binder c2ce934361
Apply type converters on variables (#730) 2020-07-23 17:30:26 +02:00
Simon Binder a01f5be2ac
Don't attempt to analyze null moor files 2020-07-22 10:34:22 +02:00
Simon Binder 6b43a57911
Warn when using both primaryKey and autoIncrement() 2020-07-21 19:43:43 +02:00
Simon Binder 834ca520b1
Lint for mismatching types in arithmetic expressions 2020-07-18 11:19:20 +02:00
Simon Binder ba60bb9962
Don't generate const constructors for mutable classes (#699) 2020-07-17 13:12:06 +02:00
Simon Binder 6922ae0409
Guard against invalid sessions in the type deserializer 2020-07-14 19:10:22 +02:00
Simon Binder bf464c751a
Remove usage of newly deprecated analyzer apis 2020-07-13 21:49:21 +02:00
Simon Binder 7ce9ee3b0c
Fix remaining InconsistentAnalysisExceptions 2020-07-13 15:28:18 +02:00
Simon Binder e21163d90a
Deprecate the eagerly_load_dart_ast option 2020-07-09 17:49:05 +02:00
Simon Binder fa1e76f8f3
Option to get raw data in result sets (#615) 2020-07-09 17:38:46 +02:00
Simon Binder 7ff91a620a
Some improvements related to generator error recovery 2020-07-07 23:01:02 +02:00
Simon Binder 2332c58742
Override toString in result classes (#676) 2020-07-02 19:59:41 +02:00
Simon Binder 1e8a1de6c0
sqlparser: Add visit methods for Queryable subclasses 2020-06-16 14:25:31 +02:00