Commit Graph

506 Commits

Author SHA1 Message Date
Simon Binder 0f7929e8e7
Add Value.ofNullable() (#1209) 2021-05-20 11:15:28 +02:00
Simon Binder edf74cb860
Don't count columns with useColums: false (#1189) 2021-05-13 10:59:31 +02:00
Simon Binder 5f7c20d4eb
Allow named constructors in custom row classes 2021-05-09 12:42:02 +02:00
Simon Binder e05e8fe07e
Add min, max and avg for date times (#1182) 2021-05-07 13:46:13 +02:00
Simon Binder 258512e044
Support dart placeholders for inserts 2021-05-06 22:35:57 +02:00
Simon Binder 382ed71204
Add insertReturning 2021-05-06 18:19:01 +02:00
Simon Binder adb27d056b
Start phasing out SqlTypeSystem 2021-04-25 16:14:33 +02:00
Simon Binder 885c63e66e
Merge branch 'stream-cancellations' into develop 2021-04-19 21:39:10 +02:00
Simon Binder 925080bd35
Improve cancellations, test with switchMap 2021-04-15 20:52:43 +02:00
Simon Binder 6bbff77271
Rename to @CustomRowClass 2021-04-09 23:33:58 +02:00
Simon Binder 65cdce342d
Prepare api for custom data classes 2021-04-09 21:17:28 +02:00
Simon Binder 58fdda482f
Add caseMatch to build CASE WHEN 2021-04-04 21:37:32 +02:00
micimize 03f9c03ec7
standardize docstrings 2021-04-04 11:28:52 -05:00
micimize fb2423c28f
use arrow functions and entry* naming for singletons 2021-04-04 11:25:15 -05:00
micimize 7f83898d00
normalize example methods based on docs elsewhere 2021-04-04 11:13:10 -05:00
Michael Joseph Rosenthal eb0c5da412
Merge branch 'develop' into single_selectable 2021-04-04 11:04:34 -05:00
micimize bb38169803
Selectable refinement: add docs, explanations, and examples 2021-04-04 11:02:49 -05:00
micimize 2db108529f
break Selectable methods into smaller interfaces based on return type.
This makes it so users can expose more refined/foolproof apis to their application:

```dart
extension TaskMethods on Task {
  /// won't make mistakes like using getSingle when using
  SingleOrNullSelectable<CalendarEvent> get event =>
      db.calendarEvents.forTask(this);

  /// autocomplete ignores getSingle, etc
  MultiSelectable<Metric> get metrics =>
      db.metrics.forTask(this);
}
```
2021-04-02 21:26:18 -05:00
Simon Binder cc93fa8238
Fix nullability issues with cancellations 2021-04-01 17:29:03 +02:00
Simon Binder 2fa3b47235
Actually, don't cancel on the same isolate 2021-03-31 23:30:18 +02:00
Simon Binder edb219ecfe
Use Future.delayed in cancellation zones only 2021-03-31 23:10:07 +02:00
Simon Binder 04a8bb5694
Support cancellations across isolates 2021-03-31 22:55:35 +02:00
Simon Binder 357764a1b7
Initial support for query cancellations 2021-03-31 21:49:34 +02:00
Simon Binder eb39738460
Initial support for RETURNING in the generator 2021-03-30 23:24:28 +02:00
Simon Binder 786bdfa2fc
Don't use types in StreamQueryStore 2021-03-29 22:32:32 +02:00
Simon Binder 401b4d3650
Fix reading nullable columns 2021-03-23 16:59:11 +01:00
Simon Binder 3eb6b75bcf
Fix typos in warning about duplicate dbs (#1111) 2021-03-21 11:01:38 +01:00
Simon Binder 7d844d448f
Wrap rollback errors (#1052) 2021-03-18 16:58:12 +01:00
Simon Binder 8499ef4e10
Add watchedTables to CustomExpression 2021-03-13 10:49:29 +01:00
Simon Binder b3f573d8ed
Update stream for subqueries (#1095) 2021-03-13 10:41:36 +01:00
Simon Binder 13dd26631a
Add MoorWebStorage.volatile 2021-03-10 10:38:25 +01:00
Simon Binder 6714db7aef
Fix type argument in innerJoin and leftOuterJoin 2021-03-05 11:15:14 +01:00
Simon Binder dbc4bcffaa
Fix view generation and references 2021-03-01 11:54:46 +01:00
Simon Binder 2a26253bd2
More docs on remote databases 2021-02-20 11:22:56 +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 c6902bbadc rename 2021-02-17 09:57:35 +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 510fb829fe
Oops, wrong annotation 2021-02-16 17:38:10 +01:00
Simon Binder b0dbee585f
Add scalar subqueries, IS IN to Dart api 2021-02-16 17:26:44 +01:00
David Martos a277aebd15 subquery class 2021-02-16 12:47:13 +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
Hossein Yousefi c9269e13be added support for CREATE VIEW in .moor files 2021-02-10 16:23:51 +01:00
Simon Binder 7a2c4e7f75
Avoid empty import 2021-02-03 21:02:33 +01:00
Simon Binder 20d9cdf0fd
Add web worker example 2021-01-31 21:50:12 +01:00
Simon Binder 449d1cb2d3
Transform Uint8List in new isolate implementation 2021-01-31 15:52:43 +01:00
Simon Binder 2592a24d9e
Generalize isolate api to allow remote database access 2021-01-31 14:25:33 +01:00
Simon Binder ef40045846
Don't require type parameters on Variable 2021-01-26 21:08:15 +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 4ffe29fe17
Mention readRowOrNull in docs and exception 2021-01-18 19:19:39 +01:00
Simon Binder 64fd91d2a8
Merge branch 'master' into develop 2021-01-11 19:57:04 +01:00
Simon Binder b8eed2f75b
Make order by placeholders optional (#998) 2021-01-08 22:30:17 +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 603c9a20cc
Remove QueryEngine mixin 2021-01-03 17:04:33 +01:00
Cervon Wong de8c6dff0f
Update columns.dart to fix typo in doc comments
Not sure which word is meant to be used, but fixed up the phrasing to make it sound better.
2020-12-27 10:38:10 +08:00
CDDelta 13fcc75b1c fallback indexedDbIfSupported in private mode on FF 2020-12-22 20:44:17 +11:00
Simon Binder 36edcf0ed6
Make getSingle() and watchSingle() non-nullable 2020-12-14 20:22:27 +01:00
Simon Binder d9cf6660ec
Allow Expression<bool?> in more places 2020-12-14 19:43:32 +01:00
Simon Binder 1edcc634b1
Fix bug with VmDatabase.opened 2020-12-07 22:03:55 +01:00
Yurii Cherniavskyi f559212c11 Fix UseDao class doc comments typo 2020-12-04 23:56:42 +02: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
Cervon Wong a491c74f9f
Update documentation to fix typos and improve phrasing 2020-12-01 17:18:54 +08:00
Simon Binder 472560684a
Improve documentation of withLength (#947) 2020-12-01 09:21:43 +01:00
Simon Binder 87d6e2ad31
Remove some usages of dynamic 2020-11-26 17:22:59 +01:00
Simon Binder 51e62d4e2f
Run tests with null assertions enabled 2020-11-22 17:40:53 +01:00
Simon Binder 8d6d1727fb
Setup CI in GitHub actions 2020-11-20 18:01:18 +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 13056b0cf6
Migrate core libraries 2020-11-18 17:07:05 +01:00
Simon Binder 66a2cd0b09
Explain that autoIncrement and primaryKey are incompatible 2020-11-18 10:39:23 +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 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
Simon Binder e9ac099b31
Add strong warning to closeExistingInstances 2020-10-17 14:39:45 +02:00
Simon Binder cf537721cb
Add tools to generate old versions of a database 2020-10-14 21:15:17 +02:00
Simon Binder 8b3e6a55d1
Merge pull request #870 from kuhnroyal/feature/support-migration-with-autoindexes
Support table migration with autoindexes
2020-10-13 18:16:40 +02:00
Simon Binder 5044ca2863
Improve error message on isolate transaction misuse 2020-10-13 18:07:31 +02:00
Peter Leibiger a68ff3dc9f
Skip sqlite_autoindexes during table migration 2020-10-13 12:42:39 +02:00
Simon Binder 2a991bf203
Export SqliteException from moor/ffi (#860) 2020-10-11 21:07:14 +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 fac99e1d6b
Run CI with Dart 2.10 2020-10-02 18:43:27 +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 0a3340da72
Migrations: Query legacy schema table for compatibility 2020-09-19 20:08:44 +02:00
Simon Binder 9d9a4f4065
Add customStatement to batch api (#817) 2020-09-11 11:19:18 +02:00
Simon Binder c303781bb1
Assert transactions aren't used after they complete 2020-09-06 14:20:02 +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 0bc6f1368b
Add coalesce function (#780) 2020-08-21 20:59:55 +02:00