Commit Graph

556 Commits

Author SHA1 Message Date
Simon Binder 28cfa957a6
Deprecate issueCustomStatement in favor of customStatement (#729) 2020-07-23 12:54:39 +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
tactical_retreat 4443be79d5 Make DefaultValueSerializer null-safe for blobs
This fixes an issue where a nullable blob column, e.g. `BlobColumn get logic => blob().nullable()();` will throw an error that looks like `NoSuchMethodError: The method 'cast' was called on null.`

(cherry picked from commit 87937ba89b28e956963555d7a456b61b67500043)
2020-07-13 16:39:23 -04:00
Simon Binder 22391a9c54
Migrate benchmarks to sqlite3/ package 2020-07-10 17:30:10 +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 e4fa5fb936
Begin migration to sqlite3 package 2020-07-08 19:04:57 +02:00
Simon Binder 634d1318e0
Add empty Android plugin class to moor_ffi 2020-07-03 12:10:37 +02:00
Simon Binder 2332c58742
Override toString in result classes (#676) 2020-07-02 19:59:41 +02:00
Simon Binder ac20d9b324
Fix some pub warnings that appeared during publishing 2020-06-28 21:17:33 +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 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
Simon Binder bccbb3e7a8
Don't require tables on UseMoor or UseDao 2020-06-21 18:19:59 +02:00
Ilya Beregovskiy 20137035be move docs links /kripken/sql.js ->/sql-js/sql.js 2020-06-19 16:28:14 +03:00
Simon Binder 374266b70b
Mark beforeOpen as nonVirtual 2020-06-16 14:25:59 +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
Till Friebe 503f2e023e Add hashcode and equals to value
This simplifies testing, as now one can compare like this:
```dart
expect(Value(1), Value(1));
```
Or a realistic example:
```dart
final capturedArgument = verify(fooDao.insert(captureAny)).captured.first.createdAt;
expect(capturedArgument, Value(DateTime(0)));
```

A test is still missing which would look something like this:
```
test('values support hash and equals', () {
  const first = Value(0);
  final equalToFirst = Value(0);
  const different = Values.absent());

  expect(first.hashCode, equalToFirst.hashCode);
  expect(first, equals(equalToFirst));

  expect(first, isNot(equals(different)));
  expect(first, equals(first));
});
```
I'm not sure where the test is supposed to be.
2020-06-08 10:11:20 +02:00
Simon Binder 32cae11aa2
Better docs for useColumns in join 2020-06-07 11:22:48 +02:00
Simon Binder 835e31c8ed
Add `this.` prefix to avoid name clashes (#613) 2020-06-03 19:07:53 +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 9be0a9f79c
Fix result sets generating twice 2020-05-22 20:32:47 +02:00
Simon Binder b8335b1222
Mention custom result class names in changelog 2020-05-22 17:25:30 +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 f5f6cbeffe
Remove protected and visibleForTesting annotations from QueryEngine 2020-05-20 18:28:45 +02:00
Simon Binder 65f02cb22c
Prepare 3.1 release of moor, 0.6 or moor_ffi, 0.9 of sqlparser 2020-05-18 20:45:48 +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 25ee06ab36
Don't attempt to close databases that have never been open (#560) 2020-05-13 11:12:17 +02:00
Simon Binder 0f2ff8c97a
Implicitly create type converters for enums, Dart api (#478) 2020-05-12 21:47:11 +02:00
Simon Binder 3dd682d522
Also log statements during migrations if desired 2020-05-12 13:38:02 +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 9841c960d1
Parse row values, warn on misuse 2020-05-06 21:08:47 +02:00
Simon Binder ab66a3befd
Support equals and hashCode in companions (#545) 2020-05-06 18:34:49 +02:00
Simon Binder c5499eb6b5
Document that delete returns number of deleted rows (#544) 2020-05-05 18:46:13 +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
Simon Binder 1fdade7ac8
Merge branch 'map-from-row-or-null-without-prefix' of https://github.com/Mike278/moor into Mike278-map-from-row-or-null-without-prefix 2020-05-03 21:16:26 +02:00
Simon Binder bd250ee9e7
Support collate expression with new type inference (#533) 2020-05-03 21:13:29 +02:00
Mike278 7e3df823db Fix null table prefix 2020-05-03 13:00:28 -04:00