Commit Graph

580 Commits

Author SHA1 Message Date
Simon Binder 2332c58742
Override toString in result classes (#676) 2020-07-02 19:59:41 +02:00
Simon Binder c80235799c
moor_generator: Properly release analyzer during tests 2020-06-28 18:48:32 +02:00
Simon Binder 3923b815fd
Merge branch 'master' into develop
# Conflicts:
#	moor_generator/pubspec.yaml
2020-06-28 17:34:00 +02:00
Simon Binder 3a558c3d1d
Prepare moor 3.2, moor_ffi 0.7 release 2020-06-28 17:27:32 +02:00
Simon Binder ab4b1d75ff
Escape keywords in moor_generator tests 2020-06-27 13:06:29 +02:00
Simon Binder 1e8a1de6c0
sqlparser: Add visit methods for Queryable subclasses 2020-06-16 14:25:31 +02:00
Simon Binder d089edd4c9
Migrate back to analyzer_plugin package (#623) 2020-06-11 18:05:23 +02:00
Simon Binder ee6e09699e
Error when using autoIncrement and primaryKey override 2020-06-04 20:50:43 +02:00
Simon Binder 835e31c8ed
Add `this.` prefix to avoid name clashes (#613) 2020-06-03 19:07:53 +02:00
Simon Binder f6ab5f64a8
Option to generate mutable data classes (#551) 2020-06-02 22:26:59 +02:00
Simon Binder 9f651b3ce9
Better support for changing analysis sessions 2020-06-02 11:48:16 +02:00
Till Friebe 1bab7f11d2 Add toString to companions
This is very useful for unit tests, because we can see directly what
values a companion has.
2020-05-28 18:52:32 +02:00
Simon Binder 074c9d973d
Don't crash when daos can't be read (#601) 2020-05-28 11:17:03 +02:00
Simon Binder 01e5a47189
Make utility visitor methods an extension 2020-05-24 19:53:36 +02:00
Simon Binder 9be0a9f79c
Fix result sets generating twice 2020-05-22 20:32:47 +02:00
Peter Leibiger 1da495a745
Fix generator required minimum analyzer version
`languageVersionMajor/Minor` was added in analyzer version 0.39.5 and is used since 4d463dd145
2020-05-22 18:10:29 +02:00
Simon Binder b8335b1222
Mention custom result class names in changelog 2020-05-22 17:25:30 +02:00
Simon Binder 8a98b42e62
Optimize row mapping when there is a matching table 2020-05-21 20:21:03 +02:00
Simon Binder 513881b13f
Always use a lambda for select mapping 2020-05-21 19:37:54 +02:00
Simon Binder 6c18eb22fa
Initial tests for custom result classes 2020-05-21 18:59:03 +02:00
Simon Binder 5d93f9fcf9
Analysis support for custom result sets 2020-05-21 15:22:49 +02:00
Simon Binder cbf8191e5d
Fix table sorting for tables referencing themselves (#586) 2020-05-20 13:41:40 +02:00
Simon Binder b5cc9b974d
Release update to pub 2020-05-18 22:07:19 +02:00
Simon Binder ba7fedb4c4
Fix generator tests that were failing due to a stronger assert 2020-05-17 20:26:21 +02:00
Simon Binder f8a516b51a
Use emitsThrough instead of emits 2020-05-17 15:08:24 +02:00
Simon Binder 63e0d61ccb
Fix resolving urls in common backend 2020-05-17 15:00:14 +02:00
Simon Binder 9bb83605e9
Don't crash when analyzing incomplete CREATE TABLE statement (#578) 2020-05-17 14:42:48 +02:00
Simon Binder 4d463dd145
Emit a warning if a project's language version is too low (#577) 2020-05-17 14:20:18 +02:00
Simon Binder cf830165e1
Support enum converters for moor files, add documentation 2020-05-13 21:43:58 +02:00
Simon Binder 7b9fa3d9ed
Simplify generation of enum type converters 2020-05-13 20:16:20 +02:00
Simon Binder 0f2ff8c97a
Implicitly create type converters for enums, Dart api (#478) 2020-05-12 21:47:11 +02:00
Simon Binder 04f24d3184
Ignore broken offset calculation for autocomplete 2020-05-12 13:38:28 +02:00
Simon Binder 254a54e9b6
Fix crash in analyzer plugin 2020-05-09 16:55:54 +02:00
Simon Binder 44bd89e47a
Don't throw when resolving types outside of the build analyzer
We still can't resolve the actual type, but at least we don't crash
now.
As we don't read the type of converters in the plugin or CLI, this
fixes #550
2020-05-08 21:43:36 +02:00
Simon Binder 0af49dd6df
Bring back the toCompanion method for data classes (#257) 2020-05-08 20:53:58 +02:00
Simon Binder c8935b0518
Respect foreign key constraints for stream query propagation (#528) 2020-05-06 22:55:38 +02:00
Simon Binder 8b6abd7140
Move referenced table finder to sqlparser package (#537) 2020-05-04 22:00:41 +02:00
Simon Binder 0a30b8a12e
Upgrade integration tests, release sqlparser 0.8 2020-05-03 13:28:34 +02:00
Simon Binder d3c4eac166
First release preparation for moor 3.0 2020-05-02 14:50:04 +02:00
Simon Binder 84bac1bf1d
Initial support for sql expressions in companions 2020-04-17 20:48:22 +02:00
Simon Binder 62a363105a
Refactor Insertables to avoid covariant parameters 2020-04-17 18:02:05 +02:00
Simon Binder 9a78604d98
Fix issues with new inference, enable it by default 2020-04-16 19:07:30 +02:00
Simon Binder 72e65611a7
Respect transitive imports when resolving moor converters
Might fix an error discovered in #482
2020-04-09 22:28:40 +02:00
Simon Binder 402b2f0d45
Merge pull request #474 from North101/develop
Fix weird behaviour with nested results
2020-04-05 14:21:42 +02:00
Simon Binder e90607c6da
Fix reading primaryKeys for tables in moor repo 2020-04-05 14:17:25 +02:00
Alexander Wilde 6eeaa88f67 Fix weird behaviour with nested results 2020-04-05 13:15:34 +01:00
Simon Binder 8bddb7c2c5
Skip null columns in Dart parser (#471) 2020-04-05 13:50:44 +02:00
Simon Binder 2c511d3ad4
Reformat sql_query class, reword docs 2020-04-04 13:07:17 +02:00
Simon Binder edc9029ece
Test linter behavior on nested columns 2020-04-04 13:01:40 +02:00
Simon Binder 4d56b861e4
Merge branch 'develop' of gh:simolus3/moor into develop 2020-04-04 11:51:45 +02:00
Simon Binder 0b7b1b7146
Fix Dart parser when primaryKey is not overridden 2020-04-04 11:48:00 +02:00
Alexander Wilde c3f5ba9aa0 Fix generating class for results with nested results. 2020-04-04 01:04:37 +01:00
Simon Binder c692c56d43
Support primaryKey override with inheritance (#467) 2020-04-03 22:02:01 +02:00
Simon Binder 1340e9291c
Generate code for nested results (#288) 2020-04-03 21:31:27 +02:00
Simon Binder dcb4c4b972
Resolve nested result sets in generator 2020-04-03 20:30:41 +02:00
Simon Binder 29eec7f784
Fix parser tests in moor_generator 2020-03-22 11:56:28 +01:00
Simon Binder 2da8577b01
Add failing test for #447 2020-03-18 13:09:18 +01:00
Simon Binder 5b675a811b
Don't consider rowid aliases required (#445) 2020-03-16 20:36:03 +01:00
Simon Binder d600bbc70e
Fix find_stream_update_rules_test 2020-03-04 22:50:49 +01:00
Simon Binder 3002d87bcb
New tableUpdates stream method on QueryEngine (#394) 2020-03-04 22:43:41 +01:00
Simon Binder b823f534c8
Write update kind for compiled update and delete queries 2020-03-04 21:28:08 +01:00
Simon Binder b0b9a0ed47
Generate more accurate update rules for triggers 2020-03-04 20:59:03 +01:00
Simon Binder 0b0d5792fd
Allow more specific updates in stream queries 2020-03-04 20:28:31 +01:00
Simon Binder 799eba1c67
Verify update rule generation in generator, fix tests 2020-03-04 16:52:08 +01:00
Simon Binder 545fbcc86a
Find and generate update rules during builds 2020-03-04 16:34:16 +01:00
Simon Binder 6c6b198943
Tests for column nullability assists 2020-02-27 11:18:08 +01:00
Simon Binder 3e691a72a6
Tests for syntax highlighting 2020-02-25 21:54:12 +01:00
Simon Binder 990755f170
Static analysis for moor_ffi functions 2020-02-19 12:25:40 +01:00
Simon Binder d43e227757
Make eager ast resolving behavior opt-in 2020-02-17 21:05:56 +01:00
Simon Binder e2b65e968a
Rename customSelectQuery to just customSelect
Also fix a crash in the builder
2020-02-17 20:43:42 +01:00
Simon Binder 11af414551
Remove the second type parameter on expressions 2020-02-17 18:05:24 +01:00
Simon Binder 57fa1d50c6
Release moor and moor_generator 2.4.0, sqlparser 0.7.0 2020-02-12 21:01:41 +01:00
Simon Binder b295542a07
Prepare release for 2.4 2020-02-10 19:46:27 +01:00
Simon Binder 814e7bf61d
SqlEngine: Migrate default construtor to options 2020-02-10 18:48:03 +01:00
Simon Binder 04a43b36d6
Handle table aliases in moor_generator 2020-02-10 18:41:02 +01:00
Simon Binder d44004e598
Explain how to use moor with built_value 2020-02-08 15:29:31 +01:00
Simon Binder cd9b7101b4
Optional part builder, example with built_value
See #89
2020-02-06 22:27:54 +01:00
Simon Binder 9494768a32
Start work on pooled connections 2020-02-01 15:56:30 +01:00
Simon Binder 5268d88344
Extract json1 support into an extension 2020-01-26 14:22:07 +01:00
Simon Binder de38761db9
Support type converters in moor files (#103) 2020-01-25 15:43:55 +01:00
Simon Binder 845d32471c
Add another missing analyzer tag to test 2020-01-23 17:16:14 +01:00
Simon Binder c6230e628f
Fix uri -> path resolution on Windows 2020-01-22 12:00:21 +01:00
Simon Binder 2efe11d386
Update sqlparser dependency in moor_generator 2020-01-21 22:05:40 +01:00
Simon Binder 257cfaca2e
Finish changelog and pubspec for 2.3 release 2020-01-21 17:55:41 +01:00
Simon Binder 40a34ac793
Add missing analyzer tag to cyclic_moor_dart_dependency 2020-01-21 10:27:30 +01:00
Simon Binder 8c62365f26
Improve type inference for parentheses 2020-01-19 13:07:47 +01:00
Simon Binder d0cb2eec37
Add analyze command to moor cli tool, documentation site 2020-01-16 23:10:05 +01:00
Simon Binder 8ae68707f8
Smarter many-to-one propagation in types2 2020-01-15 22:10:18 +01:00
Simon Binder 5d8040554f
CLI tool to export a moor schema to json 2020-01-12 10:38:03 +01:00
Simon Binder 6434f7a7d5
Support virtual tables in the analyzer plugin 2020-01-09 22:45:25 +01:00
Simon Binder 1b60879a09
Fix unnecessary re-query when subscriptions switch (#329) 2020-01-09 16:14:20 +01:00
Simon Binder 5c82b2f2a7
Loose coupling between highlighter and analyzer plugin 2020-01-09 13:50:11 +01:00
Simon Binder a0684364c5
Fix analyzer plugin crash, highlight import strings 2020-01-08 12:17:43 +01:00
Simon Binder a6e4a3669c
Fix null error when outlining a non-analyzed file 2020-01-06 20:01:41 +01:00
Simon Binder debf8b30f4
Report error when import can't be resolved 2020-01-06 19:57:44 +01:00
Simon Binder b6b5e7f7c2
Fix analysis errors from deprecated engine constructor 2020-01-05 21:41:56 +01:00
Simon Binder 70259c8f83
Build options to enable types2 inference 2020-01-04 22:29:21 +01:00
Simon Binder 373ad320c4
Support @create-queries in moor files 2020-01-03 22:15:40 +01:00
Simon Binder 00c1d2a2e7
Migrator support for indexes, tests 2020-01-03 20:08:10 +01:00
Simon Binder 5b04a08786
Generate code for indices 2020-01-03 19:36:38 +01:00
Simon Binder 8df6ab3a14
Generate fields for triggers 2020-01-03 15:47:18 +01:00
Simon Binder 3ee05bf647
Respect tables in the body of a CREATE TRIGGER statement 2020-01-03 15:38:13 +01:00
Simon Binder cf6824af82
Analyze body of CREATE TRIGGER statements 2020-01-01 21:19:10 +01:00
Simon Binder 8b86143ebb
Generate code for triggers 2019-12-31 16:03:03 +01:00
Simon Binder a3697c6f38
Find references of a trigger 2019-12-31 15:07:08 +01:00
Simon Binder 04f75d11d3
Migrate some trigger code to refactorings on develop 2019-12-30 21:38:24 +01:00
Simon Binder ba603f22cc
Merge branch 'develop' into views-triggers-indexes
# Conflicts:
#	moor/lib/moor.dart
#	moor/lib/src/runtime/api/query_engine.dart
#	moor/lib/src/runtime/query_builder/schema/entities.dart
#	moor/test/data/tables/custom_tables.g.dart
#	moor/test/data/tables/tables.moor
#	moor/test/parsed_sql/moor_files_integration_test.dart
#	moor_generator/lib/src/analyzer/moor/parser.dart
#	moor_generator/lib/src/analyzer/runner/steps.dart
#	moor_generator/lib/src/analyzer/runner/steps/analyze_dart.dart
#	moor_generator/lib/src/model/specified_db_classes.dart
#	moor_generator/lib/src/writer/database_writer.dart
#	sqlparser/lib/src/ast/ast.dart
#	sqlparser/lib/src/ast/statements/create_table.dart
#	sqlparser/lib/src/ast/statements/statement.dart
#	sqlparser/lib/src/reader/parser/schema.dart
#	sqlparser/lib/src/reader/tokenizer/token.dart
#	sqlparser/test/engine/autocomplete/static_test.dart
2019-12-30 21:08:32 +01:00
Simon Binder e9cada5e54
Api to globally override the default ValueSerializer
Closes #303
2019-12-27 18:17:45 +01:00
Simon Binder 7abda32ac4
Add argument to sql visitor class 2019-12-26 12:35:29 +01:00
Simon Binder 72934d1b87
Check isRequired at compile time, save verification code 2019-12-25 22:26:32 +01:00
Simon Binder 5314520746
clientDefault values for columns #294 2019-12-25 22:22:46 +01:00
Simon Binder d2b70e69dc
Support explicit type arguments in moor_generator 2019-12-25 21:07:08 +01:00
Simon Binder 6f8b8193b2
Increase timeout for analyzer, test moor_generator later 2019-12-23 15:13:30 +01:00
Simon Binder e01b7a1b88
Remove author from pubspec, bump version for next release 2019-12-23 12:52:46 +01:00
Simon Binder 3f0c35abff
Improve changelog, error description for columns 2019-12-23 12:24:22 +01:00
Simon Binder fb66ad101a
Merge the two query_handler_test files together 2019-12-21 23:12:24 +01:00
Simon Binder d7225ad9a5
Support inheritance for daos (#285) 2019-12-21 22:44:52 +01:00
Simon Binder c07ca12273
Set hasMultipleTables: true when appropriate 2019-12-21 14:57:36 +01:00
Simon Binder 7cfbb4d074
Check if a query references multiple tables 2019-12-21 14:51:36 +01:00
Simon Binder 2c57a80771
Revert using mapFromRow() for matched tables in queries 2019-12-21 14:51:22 +01:00
Simon Binder 8f15356357
Merge branch 'master' into develop
# Conflicts:
#	moor/CHANGELOG.md
#	moor/test/data/tables/custom_tables.g.dart
#	moor/test/data/tables/tables.moor
#	moor_generator/lib/src/analyzer/runner/task.dart
#	moor_generator/lib/src/backends/build/moor_builder.dart
#	moor_generator/test/analyzer/moor/cfe_test.dart
2019-12-18 22:04:50 +01:00
Simon Binder cb38590ee4
Parse special `@`-queries (not analyzed yet), #280 2019-12-17 22:03:59 +01:00
Simon Binder a8aa65e4c1
Improve some docs, abstract base plugin class 2019-12-17 12:05:09 +01:00
Simon Binder d2864d6859
Support reading MoorOptions in CLI analyzer 2019-12-16 21:50:21 +01:00
Simon Binder 587e8fd1a9
Don't crash when reading part of files 2019-12-16 19:34:26 +01:00
Simon Binder ae91b5d526
Expose plugin debug server as cli command 2019-12-15 21:38:46 +01:00
Simon Binder 49a1e8253e
Initial, rough implementation of a standalone runner 2019-12-15 21:14:03 +01:00
Simon Binder 9f9361cfd7
Replace plugin backend with more general common backend 2019-12-15 11:29:50 +01:00
Simon Binder e4fed775de
Basic tests for the file tracker, even found a bug 2019-12-14 22:30:35 +01:00
Simon Binder ebd94cad82
Extract common moor drivers 2019-12-14 22:03:16 +01:00
Simon Binder c69b7cb283
Move builders and analyzer plugin into subfolder 2019-12-14 21:49:51 +01:00
Simon Binder 8661e0a28a
Refactoring on the model classes in moor_generator 2019-12-14 21:43:04 +01:00
Simon Binder f30f6f6b9b
Ignore warning for analyzer src import 2019-12-13 22:31:24 +01:00
Simon Binder c9f29fab5b
Support detailed analysis for fts5 functions 2019-12-13 22:30:36 +01:00
Simon Binder 94634bd48b
Support custom fts5 queries 2019-12-12 18:56:37 +01:00
Simon Binder da9ca61e0c
Don't remap tables from sql -> moor -> sql 2019-12-12 18:06:56 +01:00
Simon Binder 7ab71f7558
Adapt tests for new equals methods 2019-12-12 18:00:29 +01:00
Simon Binder cf607f0108
Escape column names during insert 2019-12-12 09:23:41 +01:00
Simon Binder a23ff772fa
Improve syntax highlighting in the sql IDE 2019-12-11 21:14:33 +01:00
Simon Binder bdea374fa2
Generator: Extract writer into a top-level library 2019-12-11 10:44:28 +01:00
Simon Binder 2c97373bdd
Support implicit-dynamic: false
Closes #268
2019-12-10 20:38:08 +01:00
Simon Binder 74ebb8a9ab
Ability to create fts5 tables in moor files (#196) 2019-12-10 20:24:08 +01:00
Simon Binder 40eaf17a7d
Generator tests: Always provide task and file for a step 2019-12-07 17:53:53 +01:00
Simon Binder 028d5558f5
Fix alias typo when generating table classes 2019-12-07 09:29:18 +01:00
Simon Binder 28b1e19145
Test that dart components can be used from UseMoor/Dao
Fixes #267
2019-12-05 19:23:52 +01:00
Simon Binder 3c74a20f56
Enable more recent lints and enforce them 2019-12-04 21:45:09 +01:00
Simon Binder 092f64d7cf
Escape column names during insert 2019-12-02 21:40:41 +01:00
Simon Binder a0ce3421c9
Resolve json functions when option is set (#235) 2019-11-28 21:50:55 +01:00
Simon Binder 8320ddc788
Make modules configurable via a build option 2019-11-28 20:46:42 +01:00
Simon Binder 9e7e6d0922
Use json_serializable for the build options 2019-11-28 20:34:07 +01:00
Simon Binder 75d4463085
Use same generator session in same build step 2019-11-28 20:14:08 +01:00
Simon Binder a937956d41
Prepare 2.1.1 release of moor_generator
Contains fixes for CTE crashes and build issues
2019-11-24 21:28:45 +01:00
Simon Binder f7bc2f1210
Verify that tables are found through delegated columns 2019-11-24 21:21:32 +01:00
Simon Binder 68b516fff4
Fix analyzer crash at CTE (#255) 2019-11-24 21:21:32 +01:00
Simon Binder 6fb57ca53f
Disable our own caching algorithm across build steps 2019-11-24 21:20:55 +01:00
Simon Binder 684c988d4e
Verify that tables are found through delegated columns 2019-11-24 14:54:19 +01:00
Simon Binder bb1fcc1590
Fix analyzer crash at CTE (#255) 2019-11-24 14:46:20 +01:00
Simon Binder 3872c64561
Upgrade build_test, remove own writer workaround 2019-11-21 16:12:58 +01:00
Simon Binder a1f9e7ce13
Disable our own caching algorithm across build steps 2019-11-20 11:51:38 +01:00
Simon Binder 261fbe6ba0
Verify behavior of the type-extracting builder 2019-11-18 15:02:31 +01:00
Simon Binder 8819245685
Resolve Dart expressions in moor files 2019-11-18 13:59:10 +01:00
Simon Binder 7609df34f0
Support selecting custom expressions 2019-11-16 16:38:02 +01:00
Simon Binder 598fef750e
RELEASE
- moor 2.1.0
- moor_generator 2.1.0
- sqlparser 0.4.0
- moor_ffi 0.2.0
2019-11-16 11:23:11 +01:00
Simon Binder e83464df28
Prepare 2.1.0 release 2019-11-13 21:14:38 +01:00
Simon Binder 98470109cf
Remove built_value(_generator) dependency from generator 2019-11-04 17:09:21 +01:00
Simon Binder 5cc1f85441
Inject mock streams via .connect constructor 2019-10-30 19:25:26 +01:00
Simon Binder bf1e174ca3
Formally support analyzer 0.40.0
It looks like we don't use any of the removed APIs, but that's hard to verify because most of our dependencies don't support analyzer 0.40.0 yet.
2019-10-27 10:46:29 +01:00
Simon Binder 45a8d8fbb3
IDE: Add navigation support for more types of columns 2019-10-24 20:41:58 +02:00
Simon Binder 8a54fd4729
Generate code for CREATE TRIGGER statements 2019-10-21 18:13:28 +02:00
Simon Binder a69f469444
Support sqlite_master, sqlite_sequence tables (#197) 2019-10-19 16:56:36 +02:00
Simon Binder fd27c878d4
Fix errors in sqlparser that were swallowed before 2019-10-19 16:41:30 +02:00
Simon Binder 263004fe7b
Option to use the column name as json key in moor files
Closes #176
2019-10-17 21:44:20 +02:00
Simon Binder 95f37575f8
Optionally use data class name for companions
Closes #185
2019-10-16 21:33:13 +02:00
Simon Binder 4c090af98c
Ability to override json keys in moor files (#176) 2019-10-14 19:59:52 +02:00
Simon Binder ff7d587339
Add real-world example for table inheritance to test 2019-10-11 22:03:32 +02:00
Simon Binder 0b9d4c897b
Properly handle overridden elements when parsing columns 2019-10-11 18:00:17 +02:00
Simon Binder 337e260667
Support inheritance in table definitions (#169) 2019-10-11 17:43:48 +02:00
Simon Binder 24c4e5c7d4
Don't run analyzer tests on the CI 2019-10-11 16:42:08 +02:00
Simon Binder 5ae3d7c2af
Prepare pubspec and changelog for 2.0.1 release 2019-10-11 13:17:50 +02:00
Simon Binder fb85ac80cb
Run builder on integration tests, support analyzer 0.38 2019-10-10 17:30:22 +02:00
Simon Binder aef8e15d61
Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	moor_generator/CHANGELOG.md
2019-10-09 20:32:25 +02:00
Simon Binder 5510a90583
Fix warnings (2.6-dev SDK), escape \r, constant workaround 2019-10-09 19:48:52 +02:00
Simon Binder 6e32e37dd7
Remove unnecessary type parameter on createCompanion 2019-10-05 22:41:23 +02:00
Simon Binder 718af051ff
Optionally disable verification code (#173) 2019-10-05 21:41:20 +02:00
Simon Binder ed03bff4c2
Recognize boolean and datetime column in moor 2019-10-05 21:24:41 +02:00
Simon Binder 364e3f0c1a
Release moor 2.0 2019-10-03 15:39:32 +02:00
Simon Binder 20cac9fefd
Merge branch 'develop' into beta 2019-10-01 20:39:44 +02:00
Simon Binder 7cae79d76b
Document how to debug the plugin, prepare 2.0 release 2019-10-01 17:58:17 +02:00
Simon Binder 1ba687696f
Plugin: Navigation support for table references 2019-09-28 23:15:23 +02:00
Simon Binder d91c69493f
Plugin: Navigation for column references in queries 2019-09-28 22:24:40 +02:00
Simon Binder b9f934c1d4
Report information about where a column was declared 2019-09-28 22:01:28 +02:00
Simon Binder 12a6c45a42
Plugin: Fix deadlock when analyzing Dart imports in .moor 2019-09-28 19:21:03 +02:00
Simon Binder 1fc9ccb3cc
Plugin: Report navigation targets for import statements 2019-09-27 23:15:08 +02:00
Simon Binder ab787b82be
Use existing parser code for auto-complete
This works very well when the user is typing at the end of a statement, but won't provide accurate results when editing in the middle.
2019-09-27 22:06:14 +02:00
Simon Binder b684a7be69
Replace imports of test_api with test 2019-09-26 22:52:20 +02:00
Simon Binder a6cfc5fdd8
Better types for nested expressions, more 2.0 docs 2019-09-26 22:46:19 +02:00
Simon Binder fb68dc0888
Introduce option to generate less query code 2019-09-25 20:01:16 +02:00
Simon Binder 0cbac2ee37
Parse compound select statements 2019-09-25 14:58:44 +02:00
Simon Binder 75f432c5f4
Merge branch 'develop' into beta 2019-09-24 22:51:09 +02:00
Simon Binder ba21a594af
Fix autocomplete and suggestions in the analyzer plugin 2019-09-24 20:50:23 +02:00
Simon Binder 18639a364c
Merge branch 'develop' into beta 2019-09-22 21:45:51 +02:00
Simon Binder 7d962a1f01
Fix typo in new override flag 2019-09-20 19:36:09 +02:00
Simon Binder 161f7c0203
Optionally override hashCode and equals in result sets 2019-09-20 19:31:36 +02:00
Simon Binder 4e166f189c
Colorize errors in moor files again 2019-09-18 21:40:19 +02:00
Simon Binder 7121bac866
More work on the analyzer plugin
- finish migration to refactored generator
- document how to use the analysis plugin
- better error reporting without redundant messages
2019-09-18 20:48:44 +02:00
Simon Binder 00b2956b35
Allow data class names to be overridden in sql
Closes #147
2019-09-17 15:23:24 +02:00
Simon Binder 746b8401ec
Scan comments in sql 2019-09-16 22:33:36 +02:00
Simon Binder 2bf42a6157
Resolve table references declared by foreign key clause 2019-09-16 19:36:56 +02:00
Simon Binder 25ceda3505
Report lints about invalid Dart Templates in SQL 2019-09-15 11:59:47 +02:00
Simon Binder 5b6bd1db37
Fix some queries with Dart templates not compiling 2019-09-15 10:51:35 +02:00
Simon Binder c95a3badb2
Infer types for dart placeholder expressions
Also, infer where clauses to have a bool type
2019-09-14 22:44:20 +02:00
Simon Binder e89f9227ab
Don't write ResultSet classes for single-column queries
Fixes #148
2019-09-14 19:03:52 +02:00
Simon Binder 54c3dbc4b8
Write variables created in a dart template 2019-09-14 17:48:17 +02:00
Simon Binder 349b245089
Write implementation for Dart placeholders 2019-09-14 16:42:24 +02:00
Simon Binder bf7c9feddf
Write parameter declarations for Dart placeholders 2019-09-14 12:26:58 +02:00
Simon Binder 7a8191fe7e
Fix moor queries not expanding array vars properly 2019-09-14 09:27:36 +02:00
Simon Binder e9225cf759
Always generate private watch methods 2019-09-13 21:11:17 +02:00
Simon Binder c8ae99b52e
Breaking changes for the upcoming version
1. Removes transaction parameter in callbacks, custom queries
2. Removes MigrationStrategy.onFinished
2019-09-13 21:04:15 +02:00
Simon Binder 3097bb0591
Don't write get/watch methods for queries declared in moor 2019-09-13 20:23:48 +02:00
Simon Binder 8ff5a7625e
Write another integration test with cyclic queries 2019-09-13 20:15:55 +02:00
Simon Binder e50e7b3f21
Write integration test for tables feature 2019-09-13 20:01:09 +02:00
Simon Binder 156ef1ceb5
Support queries declared in .moor files 2019-09-12 21:08:30 +02:00
Simon Binder 6a0716daaf
Handle import statements and declared queries in .moor 2019-09-12 19:51:15 +02:00
Simon Binder f3db52717f
Extract steps into multiple files 2019-09-12 19:09:56 +02:00
Simon Binder b8cca3dcc2
Migrate AS plugin and build backend to new task api 2019-09-12 16:01:28 +02:00
Simon Binder e394292978
Refactor the backend (again)
We now have a two-pass parsing and analyzing model that
supports (zyklic) imports between Dart and moor files.
2019-09-11 23:00:46 +02:00
Simon Binder 28f13abfc3
Fix type converters loosing generic information
Fixes #144
2019-09-11 21:30:42 +02:00
Simon Binder a5cecd3ba6
Support moor file AST in the plugin 2019-09-09 20:34:14 +02:00
Simon Binder 1b7721a98f
Plugin: Import assists for column nullability 2019-09-08 21:36:26 +02:00
Simon Binder d79b04193c
Report syntax errors in moor files from the plugin 2019-09-08 11:22:36 +02:00
Simon Binder e807822f3f
Make plugin operate on the new MoorFile AST node 2019-09-08 10:29:59 +02:00
Simon Binder 7354b56712
Merge branch 'develop' into analyzer-plugin
# Conflicts:
#	moor_generator/lib/src/analyzer/moor/parser.dart
#	sqlparser/lib/src/engine/sql_engine.dart
2019-09-07 23:05:36 +02:00
Simon Binder 35e5bdb317
Introduce new top-level ast node for moor files 2019-09-07 21:33:56 +02:00
Simon Binder 8268867369
Fix analyzer errors, re-run build_runner 2019-09-07 20:01:33 +02:00
Simon Binder 1fcc6facee
Implement basic functionality of the analyzer plugin 2019-09-07 18:49:11 +02:00
Simon Binder 10dca6a8a9
Migrate analysis plugin to refactored generator 2019-09-07 15:19:40 +02:00
Simon Binder b550afd68f
Merge branch 'develop' into analyzer-plugin
# Conflicts:
#	moor_generator/lib/src/parser/moor/moor_analyzer.dart
2019-09-07 11:31:34 +02:00
Simon Binder 71d1bfdc9c
Scaffold api to support type converters in moor files
I still don't know how to parse expressions though :(
2019-09-06 22:23:44 +02:00
Simon Binder ba772ef07f
Better error handling when parsing multiple sql statements 2019-09-03 21:24:59 +02:00
Simon Binder 867f953107
Merge branch 'develop' into refactor-generator
# Conflicts:
#	moor_generator/lib/src/analyzer/sql_queries/lints/linter.dart
2019-09-03 19:35:23 +02:00
Simon Binder 35fcdb2c0f
Implement error handling in the refactored builder 2019-09-03 19:30:05 +02:00
Simon Binder 74dc2e5404
Finish refactoring of moor_generator 2019-09-02 20:28:57 +02:00
Simon Binder ad8bdba4b8
Start migration of writer code 2019-09-02 17:26:30 +02:00
Simon Binder 6e89a319ad
Refactored parser can now parse Dart tables 2019-08-31 12:22:25 +02:00
Simon Binder 23fca61961
Start with some refactoring in the generator
The idea is that we have a setup that let's us use multiple backends (build, analyzer plugin, standalone) with maximum code sharing.
2019-08-30 23:09:22 +02:00
Simon Binder 876db0671e
Provide lints on insert statements that will fail 2019-08-29 21:09:20 +02:00
Simon Binder 3cb00a4b31
Remove unnecessary "this." in insert companion constructor 2019-08-29 16:33:15 +02:00
Simon Binder 241baed0c3
Generate query implementations for insert statements 2019-08-29 16:27:55 +02:00
Simon Binder 4e83c0275b
Generate constructor for companions with @required fields 2019-08-29 13:54:08 +02:00
Simon Binder 0860b6645a
Generate selectable for custom queries
This makes is easier to use getSingle() and watchSingle()
on them.
Fixes #120
2019-08-27 18:44:34 +02:00