Commit Graph

675 Commits

Author SHA1 Message Date
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 0259fd58fd
Support older versions of the convert package too 2020-11-26 16:59:06 +01:00
David Martos 439f36ca85 sqflite_sqlcipher nnbd version 2020-11-25 17:24:47 +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 e067b00375
Delete Cirrus CI files 2020-11-20 20:02:12 +01:00
Simon Binder 05feecf32c
Don't run isolate tests in GitHub actions 2020-11-20 19:36:03 +01:00
Simon Binder 8d6d1727fb
Setup CI in GitHub actions 2020-11-20 18:01:18 +01:00
Simon Binder d0a1ba04e2
Use right Dart binary for tests, ugh 2020-11-19 22:43:07 +01:00
Simon Binder c714ca54d4
Run moor tests individually 2020-11-19 22:22: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 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 0ef7353df5
Setup CI with Dart 2.12 beta 2020-11-18 10:53:20 +01:00
Simon Binder 66a2cd0b09
Explain that autoIncrement and primaryKey are incompatible 2020-11-18 10:39:23 +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 c7669a18a0
Fix more bugs in schema verification tests 2020-11-11 11:36:19 +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
Simon Binder e29fcf93f7
Publish moor 3.4, sqlparser 0.11 2020-10-22 14:17:54 +02:00
Simon Binder e9ac099b31
Add strong warning to closeExistingInstances 2020-10-17 14:39:45 +02:00
Simon Binder ce37d15d2a
Generate nnbd code for inputs that have opted in 2020-10-17 14:31:04 +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
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 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 0b8aa9b3dd
Also fix sqlite_schema usages in test 2020-09-24 18:43:04 +02:00
Simon Binder 0a3340da72
Migrations: Query legacy schema table for compatibility 2020-09-19 20:08:44 +02:00
Simon Binder 39ab61e551
Ignore deprecated members from same package in moor 2020-09-19 17:41:19 +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 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 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 6fba2555c1
Api to turn AST nodes into a textual represenation 2020-08-21 16:44:17 +02:00
Simon Binder 3552e0c5dc
Work around build bug in moor 2020-08-20 21:00:21 +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 ffc01e4516
ffi: Create parent dir to avoid misuse errors (#731) 2020-08-14 21:57:49 +02:00
Simon Binder a2b28945d1
Add DatabaseConnection.delayed constructor 2020-08-13 21:09:26 +02:00
Simon Binder a037de6621
Support rowid resolution outside of selects
This fixes #754
2020-08-10 10:46:33 +02:00
Simon Binder 153cfadd81
Remove debug print 2020-08-07 21:36:20 +02:00
Simon Binder 82e0ff4827
Allow changing the onData callback in query streams 2020-08-07 21:33:17 +02:00
Simon Binder 5510cb97b1
Release version 3.3.0 and moor_ffi 0.8.0 2020-07-29 13:00:50 +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 3215b7e571
Prepare 3.3.0 release 2020-07-28 22:30:04 +02:00
Simon Binder c2ce934361
Apply type converters on variables (#730) 2020-07-23 17:30:26 +02:00
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