Commit Graph
996 Commits
Author SHA1 Message Date
Gwendal Roué c04e6ad86d Tests for updateChanges(_:with:) 2018-11-21 21:48:24 +01:00
Gwendal Roué 53adad16e5 Tests for Database.reindex(collation:) 2018-11-17 18:56:38 +01:00
Gwendal Roué ead2b13362 Optimize value observation for views that feed from a single table
By removing views from the observed database region, we allow the "single-table observation optimization" to kick in.

Thank you @foxware00 for revealing this opportunity in #441 :-)
2018-11-17 16:29:31 +01:00
Gwendal Roué 3b7801efff Cache full database schema 2018-11-17 15:38:55 +01:00
Gwendal Roué d868b7e1ce Test ValueObservation with database queue and pool 2018-11-17 14:12:03 +01:00
Gwendal Roué b6eb5ab399 ValueObservation: tests for region arrays 2018-11-17 13:26:14 +01:00
Gwendal Roué 1108ba4bf2 DatabaseError gets a default message, derived from its resultCode 2018-11-16 09:07:52 +01:00
Gwendal Roué 7d9e87088d Rename ValueObservation.isReadOnly to requiresWriteAccess 2018-11-02 12:31:26 +01:00
Gwendal Roué 087a899f13 Rename ValueObservation.tracking(withUniquing:fetch) to ValueObservation.tracking(_:fetchDistinct) 2018-11-01 22:18:58 +01:00
Gwendal Roué 842eaf0816 ValueObservation: perform uniquing by default 2018-11-01 21:46:59 +01:00
Gwendal Roué 30363b4a5b Tests for ValueObservation.map 2018-10-31 19:02:47 +01:00
Gwendal Roué b4b824c360 dbQueue.start(observation) -> observation.start(in: dbQueue) 2018-10-29 19:31:04 +01:00
Gwendal Roué 77de519fcc More tests for read/write observations 2018-10-29 18:40:12 +01:00
Gwendal Roué e5f43e341b ValueScheduling.unsafe guarantees that initial value is notified on the dispatch queue which starts the observation 2018-10-29 18:23:38 +01:00
Gwendal Roué 72c5769e8b ValueScheduling.unsafe 2018-10-29 13:59:02 +01:00
Gwendal Roué 669b9c4e91 Test for the ValueReducer documented in README 2018-10-29 13:31:42 +01:00
Gwendal Roué f7712473aa Move Sequence.allSatisfy where it is used: tests 2018-10-29 12:27:39 +01:00
Gwendal Roué f59dba711c Try with "tracking" 2018-10-29 09:15:18 +01:00
Gwendal Roué 489454b0d4 add(observation:observation) -> start(observation) 2018-10-29 07:19:36 +01:00
Gwendal Roué de2823b613 ValueObservation: StatementColumnConvertible tests 2018-10-28 19:28:19 +01:00
Gwendal Roué 0d5adfe5a9 ValueObservation: FetchableRecord & DatabaseValueConvertible tests 2018-10-28 19:16:55 +01:00
Gwendal Roué 0010be4e56 ValueObservation: row tests 2018-10-28 18:40:21 +01:00
Gwendal Roué 62f6cfe6b5 ValueObservation: count tests 2018-10-28 17:41:18 +01:00
Gwendal Roué 31e6ddeac3 ValueObservation: test scheduling 2018-10-28 17:32:31 +01:00
Gwendal Roué f2c3c213cc Read-only observation is enforced. When not read-only, savepoint is enforced. 2018-10-28 17:04:36 +01:00
Gwendal Roué 471808fa3b More ValueObseervation tests: fetch, with and without uniquing 2018-10-28 16:13:58 +01:00
Gwendal Roué cbe505f4a4 Cleanup 2018-10-28 16:13:34 +01:00
Gwendal Roué 087989fc89 More ValueObseervation tests: extent 2018-10-28 15:57:27 +01:00
Gwendal Roué a519a4ab86 Documentation 2018-10-28 15:38:01 +01:00
Gwendal Roué 627e8ec969 Fix wrong documentation 2018-10-28 15:35:25 +01:00
Gwendal Roué 2b78479a5e More ValueReducer tests: error 2018-10-28 15:32:55 +01:00
Gwendal Roué e0a9cced4a First tests for ValueObservation: focus on reducers 2018-10-28 13:27:43 +01:00
Gwendal Roué 26ba5768b2 whitespace 2018-10-28 13:26:40 +01:00
Gwendal Roué 08b103f5f5 DatabaseReader and DatabaseWriter are no longer available for user types
- stop testing compatibility with user types
- document that they are no longer available for user types (readme, changelog)
2018-10-26 16:42:14 +02:00
Gwendal Roué dadc5c3c58 Fix a test for syntax error that fails with SQLite 3.25.2 2018-10-08 19:16:54 +02:00
Gwendal Roué 3be3a51cdc Fix a compiler warning 2018-10-08 19:13:12 +02:00
Gwendal Roué 5a24726cf1 Documentation 2018-10-07 17:08:24 +02:00
Gwendal Roué 704da35576 aliased(CodingKey), annotated(with: aggregate, ...), count and isEmpty are now properties 2018-10-07 16:20:13 +02:00
Gwendal Roué 2774aaf292 aggregate alias cleanup 2018-10-07 15:40:38 +02:00
Gwendal Roué 8ffeb28b02 Tests for association aggregate operators 2018-10-07 15:20:24 +02:00
Gwendal Roué 39bc140dc8 Rename Annotation to AssociationAggregate 2018-10-07 11:39:46 +02:00
Gwendal Roué a0cd603c61 Nicer SQL generation for isEmpty annotation 2018-10-06 14:50:08 +02:00
Gwendal Roué 3ef8083043 testAnnotationWithJoiningMethodAndTableAliasAndSQLSnippet 2018-10-06 14:29:48 +02:00
Gwendal Roué 35ed13c940 Test for annotations in HAVING clauses 2018-10-06 14:15:35 +02:00
Gwendal Roué 24e8ee2d00 Stabilize annotation aliases, and allow aggregate any expression 2018-10-05 18:50:34 +02:00
Gwendal Roué f6b0c0cc65 Rename test 2018-10-05 18:50:34 +02:00
Gwendal Roué c16b2bcb57 The count annotation has to be distinct 2018-10-05 18:50:34 +02:00
Gwendal Roué 5d70ef93c8 Test that filter(key:), orderByPrimaryKey(), and groupByPrimaryKey() capture the table name 2018-10-05 18:50:34 +02:00
Gwendal Roué 68d76eca01 Annotations: avg, min, max, sum 2018-10-05 18:50:33 +02:00
Gwendal Roué 83453e1b11 Make private a test helper class 2018-10-05 18:50:33 +02:00