Simon Binder
70033b0bde
Merge branch 'develop' into ffi
...
# Conflicts:
# moor/lib/src/runtime/database.dart
# moor/lib/src/runtime/executor/executor.dart
2019-07-31 20:49:15 +02:00
Simon Binder
a4bfda494d
Add integration tests for transactions
...
Also fixes some bugs on the way
2019-07-31 20:47:58 +02:00
Simon Binder
f4bd6828a9
Some more fixes on the analyzer
...
Sadly, the analyzer doesn't support custom file types yet,
so that's it for the moor analyzer plugin for now.
2019-07-31 18:05:54 +02:00
Simon Binder
4210c0c836
Start some work on the analyzer plugin
...
Of course it's not working at all
2019-07-30 18:34:33 +02:00
Simon Binder
4e75cee785
Merge branch 'develop' into analyzer-plugin
2019-07-30 14:17:37 +02:00
Simon Binder
635b902352
Add test case without any additional constraints
2019-07-30 10:33:32 +02:00
Simon Binder
b1820ef5aa
Generate code to match default values for CREATE TABLE
2019-07-30 10:30:06 +02:00
Simon Binder
aa3706ae9d
Support table constraints in CREATE TABLE
2019-07-30 10:13:47 +02:00
Simon Binder
3819eae1e8
Merge branch 'develop' into analyzer-plugin
2019-07-29 18:08:21 +02:00
Simon Binder
b48970d9ef
Fixes related to the new dialects feature
2019-07-29 15:46:00 +02:00
Simon Binder
634b1adb72
Support includes on the @UseDao annotation as well
2019-07-29 15:19:58 +02:00
Simon Binder
e0a82b0e32
Finally generate table classes from sql
2019-07-29 14:22:39 +02:00
Simon Binder
5ddcd17c21
Scaffold the package layout of a future analyzer plugin
2019-07-29 10:27:50 +02:00
Simon Binder
7a9cafb02f
Deprecate diff utils, MoorAnimatedList
2019-07-28 14:45:36 +02:00
Simon Binder
7f79fd922b
Provide information about the sql dialect at runtime
2019-07-28 14:21:39 +02:00
Simon Binder
94a9b9e2bc
Document type converters feature
2019-07-28 13:44:25 +02:00
Simon Binder
7cddf6f5d7
Provide coverage upload token variable
2019-07-28 11:08:39 +02:00
Simon Binder
053d4280fc
Only format coverage once
2019-07-28 10:38:18 +02:00
Simon Binder
47a032c645
Move coverage uploading into same Cirrus task
2019-07-28 10:32:31 +02:00
Simon Binder
4c7874dd91
Test and coverage the sql parser
2019-07-28 09:49:14 +02:00
Simon Binder
b4cdcf0431
Support type converters in compiled custom statements
2019-07-28 00:02:17 +02:00
Simon Binder
dbda5dccc1
Cache type converters in static fields
2019-07-27 22:44:44 +02:00
Simon Binder
21956a6b48
Use variables instead of failing to write string literals
...
Fixes #88
2019-07-26 09:25:55 +02:00
Simon Binder
4bf58cb83b
API to close databases, integration test that saves data
2019-07-25 17:04:32 +02:00
Simon Binder
fdbffa47fc
Integration tests for the web backend
2019-07-24 23:32:45 +02:00
Simon Binder
05b84a21ef
Merge branch 'develop' into ffi
2019-07-24 22:14:46 +02:00
Simon Binder
a7395ba83d
Write integration tests, sort of run them in Flutter
2019-07-24 22:14:02 +02:00
Simon Binder
5f8ab42189
Start to work on MySQL example
2019-07-23 22:16:21 +02:00
Simon Binder
5b7ffb3dbf
Merge branch 'develop' into ffi
2019-07-23 09:36:11 +02:00
Simon Binder
e46a8d84d5
Fix failing transaction test
...
Not completing is excepted behavior now
2019-07-23 09:13:31 +02:00
Simon Binder
b3d381afe6
Rollback transactions when callback throws
...
Closes #83
2019-07-23 09:06:02 +02:00
Simon Binder
147499c1f7
Ability to rollback transactions
2019-07-23 08:49:51 +02:00
Simon Binder
e36fe84480
Merge branch 'develop' into ffi
...
# Conflicts:
# moor/lib/src/runtime/executor/helpers/engines.dart
# moor/lib/src/web/web_db.dart
2019-07-22 13:06:24 +02:00
Simon Binder
2ee548e5d8
Implement the web database with the new backends api
2019-07-22 12:47:18 +02:00
Simon Binder
56f8e447bd
Migrate VM database to use the new delegate api
2019-07-22 12:11:38 +02:00
Simon Binder
2500e5ff20
Merge branch 'develop' into ffi
...
# Conflicts:
# moor_flutter/lib/moor_flutter.dart
2019-07-22 11:32:07 +02:00
Simon Binder
48f87330d6
New API to create custom backends easier
...
Also ported the Flutter backend to that API
2019-07-22 11:30:39 +02:00
Simon Binder
4b9cd084b5
VM: transactions and before open callback
2019-07-20 22:55:27 +02:00
Simon Binder
eb0edb8ac0
Merge branch 'develop' into ffi
2019-07-20 22:32:53 +02:00
Simon Binder
37cba6971c
Attempt to fix coverage collection
2019-07-20 22:15:52 +02:00
Simon Binder
7229002383
Integration test for the Dart VM
2019-07-20 20:50:09 +02:00
Simon Binder
e9cba8d600
Type fixes for ffi
2019-07-20 19:30:47 +02:00
Simon Binder
e00f7bfa29
Use our own sqlite api instead of Dart example
2019-07-20 17:20:47 +02:00
Simon Binder
5dde293015
Start with primitive VM implementation
2019-07-20 11:56:56 +02:00
Simon Binder
35e6ed67df
Use new GeneratorSession for the writer
2019-07-20 10:18:41 +02:00
Simon Binder
c5e9e8cfc8
Start generator refactoring
...
Remove global shared state in favor of sessions that are only valid for a single build step.
2019-07-18 18:01:27 +02:00
Simon Binder
33f1732ad1
Update schema test to reflect custom column
2019-07-18 12:56:48 +02:00
Simon Binder
ff93af231c
Write correct mapping code for custom objects
2019-07-18 12:53:26 +02:00
Simon Binder
bf4d16add6
Write verification and to-sql mapping for custom columns
2019-07-18 12:21:10 +02:00
Simon Binder
c2bff3ae42
API and parser for custom types
2019-07-18 12:02:16 +02:00
Simon Binder
364570b0dc
More tests to verify behavior of cached streams
2019-07-12 21:23:28 +02:00
Simon Binder
3407c8e90e
Fix old stream references not emitting data
2019-07-12 20:50:09 +02:00
Simon Binder
f21021a6e9
Final preparations for the 1.6 release
...
Short summary of updates
- web support
- using zones to resolve the current transaction
- comparable date time values
- collate expressions
- many bug fixes
2019-07-12 10:52:42 +02:00
Simon Binder
f0e5ed9a87
Make tables implement equals and hashCode
...
Fixes #74
2019-07-11 22:02:46 +02:00
Simon Binder
256b91f03f
Emit cached data in a later microtask
2019-07-11 21:09:13 +02:00
Simon Binder
0e7ee6114b
Avoid writing duplicate mapping methods
2019-07-10 19:37:15 +02:00
Simon Binder
853e3acb4c
Migrate web example to moor 1.6
2019-07-10 19:22:55 +02:00
Simon Binder
91c455d077
Fix (and then, use) the binary encoding to persist data
2019-07-10 19:14:55 +02:00
Simon Binder
02a8dabd63
Fix crash when variables appear more than once
2019-07-10 18:25:18 +02:00
Simon Binder
df05e643e0
Migrate example to 1.6, update readme
2019-07-10 17:55:57 +02:00
Simon Binder
d01b5c750f
Fix order in limit expressions with comma
...
Fixes #73
2019-07-10 17:29:03 +02:00
Simon Binder
a96da09741
Merge pull request #70 from knaeckeKami/master
...
use .toString() instead of casting to String in StringType
2019-07-09 13:31:48 +02:00
Martin Kamleithner
0137b34d07
allow nullability in StringType
2019-07-09 13:23:28 +02:00
Martin Kamleithner
e7f37f5e93
use .toString() instead of casting to String in StringType
2019-07-09 12:51:37 +02:00
Simon Binder
aeb9b6ba41
Parse COLLATE expressions in the sql parser
...
For #67
2019-07-08 23:03:03 +02:00
Simon Binder
3f8fb97b6c
Provide Dart api for COLLATE expressions
...
For #67
2019-07-08 22:37:13 +02:00
Simon Binder
809f239ca3
Generate code for array variables in compiled statements
2019-07-07 16:04:55 +02:00
Simon Binder
08c5cfd1a8
Make the parameter for the transaction unnecessary
2019-07-07 13:03:15 +02:00
Simon Binder
da65f6e8a7
Merge branch 'web' into develop
2019-07-06 15:30:07 +02:00
Simon Binder
bebf6884c4
Document the web feature
2019-07-06 15:29:32 +02:00
Simon Binder
7d885f9298
Use local storage instead of indexeddb for versions
2019-07-06 11:00:26 +02:00
Simon Binder
97c068f0ba
Finish web prototype
2019-07-05 22:20:08 +02:00
Simon Binder
311a47c704
Create a real example for the web backend
2019-07-05 22:00:02 +02:00
Simon Binder
3b09d819f9
Make date time values comparable
...
Fixes #58
2019-07-05 18:47:29 +02:00
Simon Binder
c806a4a7b1
Delete custom test file again
...
We'll set up a proper testing architecture after the
migration to cirrus is complete
2019-07-05 11:07:33 +02:00
Simon Binder
306be497de
Also run tests on popular browsers
2019-07-05 10:22:33 +02:00
Simon Binder
54fb22d970
Transactions for the web backend
2019-07-05 09:17:46 +02:00
Simon Binder
1c423d9d7b
Extract sql.js wrapper into own file, batched statement
2019-07-05 08:02:00 +02:00
Simon Binder
544db67d17
Return the last insert id in the web backend
2019-07-05 08:02:00 +02:00
Simon Binder
0e6ed25cd5
Persist changes in web backend
2019-07-05 08:02:00 +02:00
Simon Binder
535c5ed871
Switch web implementation to sql.js
2019-07-05 08:01:59 +02:00
Simon Binder
4ee7e84e8c
Early insert tests
2019-07-05 08:01:59 +02:00
Simon Binder
65ccd49d9a
Some kind of select statements with result parsing
2019-07-05 08:01:59 +02:00
Simon Binder
e23e3ae424
First experiment on the web using AlaSLQ
2019-07-05 08:01:59 +02:00
Simon Binder
d98449407e
Don't always include identical streams
2019-07-05 07:58:23 +02:00
Simon Binder
01db5e2afc
Release moor version 1.5.1, sqlparser 0.1.1
2019-07-03 20:04:09 +02:00
Simon Binder
b9e9135ac3
Write "DEFAULT VALUES" in insert when appropriate
2019-07-02 22:42:49 +02:00
Simon Binder
59235783c3
Make query streams emit their last item for new listeners
2019-07-02 21:46:04 +02:00
Simon Binder
316f9e1052
Only resolve columns declared in scope of a statement
...
Fixes #52
2019-07-02 12:28:54 +02:00
Simon Binder
2487c64c08
RELEASE 1.5
...
- Analyzed custom queries
- Better callbacks
- Update companions
2019-07-01 22:24:38 +02:00
Simon Binder
3dddc6993a
Remove outdated todo entries
2019-07-01 21:37:08 +02:00
Simon Binder
44663d3648
Make `getSingle` and `watchSingle` return null when empty
...
Closes #47
2019-06-30 22:24:04 +02:00
Simon Binder
464754267e
Document new features for version 1.5
2019-06-30 22:16:58 +02:00
Simon Binder
f5492b8bcb
Generate code for update and delete statements
2019-06-30 19:34:54 +02:00
Simon Binder
f8834f0e15
More fluent api to define queries
2019-06-30 13:35:13 +02:00
Simon Binder
b4de942915
Write query engine override param for generated queries
...
This allows them to be used in transactions and post-
migration callbacks.
2019-06-30 13:09:07 +02:00
Simon Binder
53ea5835a8
For custom queries, use a matching data class if possible
2019-06-30 12:01:46 +02:00
Simon Binder
22f78589db
Support custom queries in daos
2019-06-29 15:51:23 +02:00
Simon Binder
53d57d6a96
Refactor generator: Extract common operations
2019-06-29 15:23:14 +02:00
Simon Binder
33682a0ad1
Write readsFrom field for custom queries
2019-06-29 14:04:01 +02:00
Simon Binder
646987ad69
Correctly write variables in analyzed queries
2019-06-29 13:47:33 +02:00
Simon Binder
2a8edbde0d
Write implementation methods for queries
2019-06-29 11:23:06 +02:00
Simon Binder
40a4ebdadf
Started to integrate the sqlparser into moor generator
2019-06-28 23:41:27 +02:00
Simon Binder
6d54a21091
Merge branch 'master' into develop
2019-06-27 10:01:05 +02:00
Simon Binder
3c7e25a169
Fix analysis warning that popped out of nowhere
2019-06-27 09:55:03 +02:00
Simon Binder
a6505d691b
Fix deserialization of null datetime values
2019-06-27 09:37:51 +02:00
Simon Binder
6e4f33c931
Apply defaults for absent values during replace
2019-06-25 22:36:31 +02:00
Simon Binder
178df7ab1e
Provide hint on join that includes same table twice
2019-06-25 22:09:56 +02:00
Simon Binder
1d36e3316d
Merge branch 'delightful-queries' into develop
2019-06-22 19:02:57 +02:00
Simon Binder
af5fca7dca
Migrate example to new opening callback
2019-06-22 19:02:25 +02:00
Simon Binder
62c5106e7d
Migrate tests to companion
2019-06-21 20:29:42 +02:00
Simon Binder
0616fb7082
Migrate to update companions everywhere :)
2019-06-21 20:08:42 +02:00
Simon Binder
0abc3993f4
Fully migrate to new update companions
2019-06-21 19:48:18 +02:00
Simon Binder
eee11d53d3
Start to migrate verification logic with update companions
2019-06-21 10:48:42 +02:00
Simon Binder
ecf6740cb7
Constraints on type parameters for data classes
2019-06-21 10:27:14 +02:00
Simon Binder
6ac9109c0a
Fix dead code in generated update companions
2019-06-21 09:44:38 +02:00
Simon Binder
b79611e6e0
Backwards compatibility: Use DataClasses as companion
2019-06-21 09:42:42 +02:00
Simon Binder
ec2592203c
Generate update companions for data classes
2019-06-21 09:16:22 +02:00
Simon Binder
214b5fd978
Improve documentation on migrations, add custom statement
2019-06-20 13:08:34 +02:00
Simon Binder
47ef4891e6
Test that callbacks are actually called
2019-06-20 12:18:14 +02:00
Simon Binder
8204f6b393
Improve docs a bit, refactor onOpen callback
2019-06-20 11:41:00 +02:00
Simon Binder
2a5ede1c04
Merge branch 'develop' into delightful-queries
2019-06-16 14:52:49 +02:00
Simon Binder
5fc921aefc
Provide detailed error messages for inconsistent data
2019-06-16 14:44:43 +02:00
Simon Binder
69f0b9b393
Begin with simple ast and parser
2019-06-15 15:16:48 +02:00
Simon Binder
cb8cb6b1a0
Keep where and limit clauses after join()
2019-06-15 14:15:19 +02:00
Simon Binder
067a33adec
Implement single() version for get() and watch()
2019-06-15 10:56:29 +02:00
Simon Binder
110d775a90
Provide an example usage in the `withDefault` method
2019-06-15 09:30:07 +02:00
Simon Binder
acbcc6bb58
Fix NPE when parsing a real type
...
Fixes #32
2019-06-11 14:49:45 +02:00
Simon Binder
87e39c7ad4
Add an option to generate fromJsonString factories
2019-06-09 22:58:06 +02:00
Simon Binder
f87472e980
Enable and enforce curly brace for control flow lint
2019-06-09 12:30:12 +02:00
Simon Binder
a1241bab1d
Version 1.4
...
More configurable serialization logic, type for floating point values
2019-06-09 12:27:24 +02:00
Simon Binder
71e3f4549a
Write unit tests for the custom serializer
2019-06-09 12:12:56 +02:00
Simon Binder
9241bbccc1
Better integration of floating-point values
2019-06-08 15:04:49 +02:00
Simon Binder
02b646524c
Upgrade dependencies
2019-06-05 21:12:23 +02:00
Simon Binder
8cc2c21c9a
Annotation to change the generated json key
2019-06-04 22:04:21 +02:00
Simon Binder
dc0b0e086d
Change email in pubspec
2019-05-29 19:43:21 +02:00
Simon Binder
023c055e44
Implement new serialization api in generated classes
2019-05-23 19:17:47 +02:00
Simon Binder
5db9a5f87d
Actually use the real type, add parent for data classes
2019-05-17 21:25:02 +02:00
Simon Binder
f83781d250
Add links to custom homepage in pubspec.yaml
2019-05-12 10:58:07 +02:00
Simon Binder
b2345a9f28
Add real datatype for numeric values
2019-05-12 10:53:00 +02:00
Simon Binder
f5a1bc7edd
Add constant default value test case
2019-05-09 15:30:17 +02:00
Simon Binder
766e5fbbdb
Raise SDK dependencies
2019-05-09 11:30:14 +02:00
Simon Binder
50690290ec
Provide proper generation context during migrations
2019-05-09 10:55:37 +02:00
Simon Binder
cd520e5d1e
Fix syntax error in generated code with empty primary key
2019-04-29 18:25:03 +02:00
Simon Binder
211bf56ae7
Fix use of primary key in migrations
2019-04-29 18:04:40 +02:00
Simon Binder
51ae079c33
Deprecate old insertOrReplace method in favor of parameter
2019-04-23 14:04:45 +02:00
yohom
0f3895b27b
chore: Rearrange methods.
2019-04-23 15:05:53 +08:00
yohom
b442fe9d34
bugfix: Remove `_orReplace` flag in `InsertStatement`, use `orReplace` parameter.
2019-04-23 15:05:18 +08:00
Simon Binder
7a44224370
Streams properly deal with aliased tables
...
Fixes #16
2019-04-19 23:54:57 +02:00
Simon Binder
8bed506e0d
Batched insert statements
...
Closes #15
2019-04-19 22:45:38 +02:00