Commit Graph

435 Commits

Author SHA1 Message Date
Simon Binder 07986ed324
Fix new analysis warning 2021-02-20 22:07:51 +01:00
David Martos fb919eeedb Fixes join when adding columns to "regular" select 2021-02-17 19:58:57 +01:00
David Martos 14aff60dfd Code review changes 2021-02-17 14:59:28 +01:00
David Martos 3f2c2ec1a4 merge with upstream 2021-02-17 09:55:35 +01:00
David Martos 49c251de7d Merge remote-tracking branch 'origin/develop' into subquery 2021-02-17 09:46:10 +01:00
Simon Binder b0dbee585f
Add scalar subqueries, IS IN to Dart api 2021-02-16 17:26:44 +01:00
David Martos a270530d05 exists expression 2021-02-16 11:59:55 +01:00
Simon Binder b0887a9fec
Inline usages of package:synchronized
Future-chaining is cheap and gets the job done. Since
the synchronized package is holding back a stable null-
safety release and only has a single use in moor, we can
drop that package in favor of a simpler implementation.
2021-02-15 18:20:55 +01:00
Simon Binder 0899980ffa
Fix tests in moor 2021-02-12 13:59:09 +01:00
Simon Binder ef40045846
Don't require type parameters on Variable 2021-01-26 21:08:15 +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 362b61a178
Add trim() function for text (#1012) 2021-01-21 20:16:42 +01:00
Simon Binder 6c1650151e
Run migrated tests in strong null safety 2021-01-20 12:50:21 +01:00
Simon Binder 896d0f90c7
Migrate more tests to null safety 2021-01-20 12:30:59 +01:00
Simon Binder e07397006f
Remove SelectableUtils extension 2021-01-20 12:06:48 +01:00
Simon Binder 5ff74c7bcb
Improve table analysis, parse key ordering (#1007) 2021-01-18 14:44:05 +01:00
Simon Binder b8eed2f75b
Make order by placeholders optional (#998) 2021-01-08 22:30:17 +01:00
Simon Binder 5e8cd53bc6
Use handwritten mocks instead of generating them 2021-01-06 19:36:50 +01:00
Simon Binder ab105cf77f
Throw from TypedResult.read/readTable if there's no data 2021-01-06 12:59:09 +01:00
Simon Binder c47471a3db
Test for migrations on without rowid tables 2020-12-16 19:26:10 +01:00
Simon Binder 36edcf0ed6
Make getSingle() and watchSingle() non-nullable 2020-12-14 20:22:27 +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 a749f38e2b
Make columns from LEFT OUTER joins nullable 2020-12-12 23:22:21 +01:00
Simon Binder 1edcc634b1
Fix bug with VmDatabase.opened 2020-12-07 22:03:55 +01:00
Simon Binder cf8215ecfe
Add Migrator.renameTable (#956) 2020-12-04 21:15:43 +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 87d6e2ad31
Remove some usages of dynamic 2020-11-26 17:22:59 +01:00
Simon Binder 0c075a2b44
Support overriding column getters and table classes (#932) 2020-11-23 20:01:31 +01:00
Simon Binder 51e62d4e2f
Run tests with null assertions enabled 2020-11-22 17:40:53 +01:00
Simon Binder 05feecf32c
Don't run isolate tests in GitHub actions 2020-11-20 19:36:03 +01:00
Simon Binder 0c9f3a3286
Fix tests for null safety 2020-11-19 18:10:43 +01:00
Simon Binder 01258d25ab
Fix nnbd code emitted by the generator 2020-11-19 14:06:51 +01:00
Simon Binder aec69a357a
Migrate to generated mockito 2020-11-18 22:53:27 +01:00
Simon Binder 13056b0cf6
Migrate core libraries 2020-11-18 17:07:05 +01:00
Simon Binder b2ef4ddbcf
Optionally generate named parameters (#918) 2020-11-16 17:03:22 +01:00
Simon Binder 08470abd47
Fix VmDatabase.opened reporting wrong open status 2020-11-11 18:29:45 +01:00
Simon Binder 5ebc7a9040
Escape keywords with double instead of backticks 2020-11-11 18:22:59 +01:00
Simon Binder b9c007f782
Add VmDatabase.opened factory 2020-11-11 10:59:03 +01:00
Simon Binder c6a6c9ac5a
Another tests for streams and migrations 2020-11-09 18:24:30 +01:00
Simon Binder 1f2dca0240
Add test to reproduce #910 2020-11-08 17:02:50 +01:00
Simon Binder 56d89b8676
Add extensions for isNull and isNotNull 2020-11-03 18:45:38 +01:00
Simon Binder ca4b2b7d8c
Use TEXT instead of VARCHAR (#886) 2020-10-23 19:29:08 +02:00
Peter Leibiger d0fae0b814
Recreate migration test failure with unique constraint 2020-10-13 12:38:16 +02:00
Simon Binder 14aa07fffa
Add another test for alterTable 2020-10-12 19:16:28 +02:00
Simon Binder 3470d0485a
Add current_time_millis SQL function (#857) 2020-10-11 11:25:21 +02:00
Simon Binder 9d9658248b
Add renameColumn method to migrator 2020-10-11 11:14:02 +02:00
Simon Binder f295af1398
Add closeExistingInstances api for #835 2020-09-30 15:39:02 +02:00
Simon Binder 430ba5b175
More tests for new alterTable migration, reword docs 2020-09-25 12:34:46 +02:00
Simon Binder 0b8aa9b3dd
Also fix sqlite_schema usages in test 2020-09-24 18:43:04 +02:00
Simon Binder 3fdac823dd
More docs, tests for advanced migrations 2020-09-18 19:15:26 +02:00
Simon Binder 9d9a4f4065
Add customStatement to batch api (#817) 2020-09-11 11:19:18 +02:00
Simon Binder 70096357e0
Add date() function to query builder 2020-09-06 13:26:56 +02:00
Simon Binder d2996af72e
Add cast function to query builder 2020-09-04 13:25:05 +02:00
Simon Binder a317bf253a
Begin with new api for complex table migrations 2020-09-04 13:13:26 +02:00
Simon Binder d6a321ca3c
Add generate_values_in_copy_with build option (#795) 2020-09-01 13:34:02 +02:00
Simon Binder b59d5b8f58
Simplify moor files integration test 2020-08-30 13:51:52 +02:00
Simon Binder 2ae2388878
Support default values for Dart placeholders (#753) 2020-08-30 13:48:47 +02:00
Simon Binder 0bc6f1368b
Add coalesce function (#780) 2020-08-21 20:59:55 +02:00
Simon Binder 9ed52f8d1d
Fix streams still emitting data after cancel (#766) 2020-08-15 21:19:29 +02:00
Simon Binder d0b13c43eb
Add groupConcat to Dart api (#763) 2020-08-15 09:53:50 +02:00
Simon Binder a2b28945d1
Add DatabaseConnection.delayed constructor 2020-08-13 21:09:26 +02:00
Simon Binder 7623362fc6
Don't test moor_ffi in CI
We don't have Flutter in the CI, and the package is
deprecated.
2020-07-29 11:28:55 +02:00
Simon Binder c2ce934361
Apply type converters on variables (#730) 2020-07-23 17:30:26 +02:00
Simon Binder 165fc37721
Add setup callback for moor ffi 2020-07-18 18:19:42 +02:00
Simon Binder ba708ee9c5
Merge branch 'use-sqlite3-package' into develop 2020-07-18 17:47:27 +02:00
Simon Binder fa1e76f8f3
Option to get raw data in result sets (#615) 2020-07-09 17:38:46 +02:00
Simon Binder e4fa5fb936
Begin migration to sqlite3 package 2020-07-08 19:04:57 +02:00
Simon Binder 2332c58742
Override toString in result classes (#676) 2020-07-02 19:59:41 +02:00
Simon Binder 34e827b0b5
Escape column names in primary key (#661) 2020-06-25 20:03:05 +02:00
Simon Binder b4aeacdba3
Add tests for errors across isolates 2020-06-23 19:35:31 +02:00
Simon Binder d881659db6
Support flags in regexp (#644) 2020-06-22 22:20:43 +02:00
Till Friebe a846b6c425 Add another test 2020-06-08 18:36:06 +02:00
Till Friebe 7a652e5ac6 Apply feedback 2020-06-08 18:17:04 +02:00
Simon Binder 835e31c8ed
Add `this.` prefix to avoid name clashes (#613) 2020-06-03 19:07:53 +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 9be0a9f79c
Fix result sets generating twice 2020-05-22 20:32:47 +02:00
Simon Binder 3955ae8eff
Generated code for custom table names 2020-05-21 20:42:50 +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 df32408a7c
Add destructive migration feature (#576) 2020-05-16 13:22:09 +02:00
Simon Binder 5c3671b465
Fix booleans not working as expected in mapFromCompanion (#559) 2020-05-13 21:51:08 +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 0af49dd6df
Bring back the toCompanion method for data classes (#257) 2020-05-08 20:53:58 +02:00
Simon Binder e30bdd2acf
Support case sensitive contains (#527) 2020-05-07 18:59:12 +02:00
Simon Binder ab66a3befd
Support equals and hashCode in companions (#545) 2020-05-06 18:34:49 +02:00
Simon Binder 79294e248a
Escape column names in updates 2020-05-04 20:15:23 +02:00
Simon Binder bb0461ccd2
Format, add to changelog 2020-05-03 21:20:52 +02:00
Mike278 7e3df823db Fix null table prefix 2020-05-03 13:00:28 -04:00
Simon Binder 5ad5cded30
Fix deprecated member usage in moor test 2020-04-30 21:30:21 +02:00
Simon Binder 81a476662c
Support contains (#527) 2020-04-30 11:51:09 +02:00
Simon Binder 2a3ed3ea12
Fix transactions in migrations for isolates 2020-04-25 16:29:46 +02:00
Simon Binder 1546f323b2
Merge branch 'master' into develop
# Conflicts:
#	docs/content/en/docs/Getting started/advanced_dart_tables.md
#	docs/content/en/docs/Using SQL/moor_files.md
#	extras/integration_tests/flutter_db/lib/moor_flutter.dart
#	moor/CHANGELOG.md
#	moor/lib/src/runtime/isolate/client.dart
#	moor/lib/src/runtime/isolate/server.dart
#	moor/pubspec.yaml
#	moor_ffi/test/database/database_test.dart
2020-04-25 12:44:01 +02:00
Simon Binder 721d25ff3c
Make insertOnConflictUpdate return a Future<int> 2020-04-24 22:34:09 +02:00
Simon Binder 821d1620cd
Run batch statements in the right order 2020-04-24 20:09:46 +02:00
Simon Binder 9300010890
Only send primitive objects over isolates (#399) 2020-04-23 21:03:50 +02:00