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é
0ea9a1ce0d
Use SchemaInfo more
2018-11-17 15:59:09 +01:00
Gwendal Roué
3b7801efff
Cache full database schema
2018-11-17 15:38:55 +01:00
Gwendal Roué
b9ab74cb1d
ValueObservation: support region arrays (address #441 )
2018-11-17 13:25:55 +01:00
Gwendal Roué
d3fd838c6c
DatabaseRegion cleanup and documentation
...
Goal: improve understanding of observation performance.
Context: https://github.com/groue/GRDB.swift/issues/441
2018-11-17 12:46:01 +01:00
Gwendal Roué
1108ba4bf2
DatabaseError gets a default message, derived from its resultCode
2018-11-16 09:07:52 +01:00
Gwendal Roué
49de0e0f49
Call sqlite3_close() even if opening failed
...
Thanks to https://github.com/feistydog/FeistyDB/commit/6859f622797480656f8897c2db5e620e6a98c858
2018-11-16 08:48:25 +01:00
Gwendal Roué
d56b62a65f
Flag ValueReducer as experimental
2018-11-10 12:31:35 +01:00
Gwendal Roué
c28a4d4061
Remove public initializers of utility value reducers
2018-11-10 12:29:31 +01:00
Gwendal Roué
3971b43894
Cleanup
2018-11-05 09:08:14 +01:00
Gwendal Roué
7d9e87088d
Rename ValueObservation.isReadOnly to requiresWriteAccess
2018-11-02 12:31:26 +01:00
Gwendal Roué
2bc8f33249
Cleanup
2018-11-02 11:49:03 +01:00
Gwendal Roué
257fc8b66a
Cleanup
2018-11-02 08:35:16 +01:00
Gwendal Roué
bc274a603c
Documentation
2018-11-02 08:35:04 +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é
bb02d9d857
ValueObservation.map
2018-10-31 12:07:08 +01:00
Gwendal Roué
cca716e1ab
Cleanup
2018-10-30 08:49:36 +01:00
Gwendal Roué
8e13cb4e6c
Cleanup
2018-10-30 07:46:41 +01:00
Gwendal Roué
d3838d1d73
ValueObservation error handling
2018-10-29 21:13:14 +01:00
Gwendal Roué
b4b824c360
dbQueue.start(observation) -> observation.start(in: dbQueue)
2018-10-29 19:31:04 +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é
1985b9129a
Fix SPM build
2018-10-29 13:09:56 +01:00
Gwendal Roué
f582683f20
Move remove(transactionObserver:) to DatabaseReader
2018-10-29 12:26:12 +01:00
Gwendal Roué
f59dba711c
Try with "tracking"
2018-10-29 09:15:18 +01:00
Gwendal Roué
93326307fa
Documentation
2018-10-29 09:00:15 +01:00
Gwendal Roué
489454b0d4
add(observation:observation) -> start(observation)
2018-10-29 07:19:36 +01:00
Gwendal Roué
158177364b
Documentation
2018-10-28 22:04:39 +01:00
Gwendal Roué
0d5adfe5a9
ValueObservation: FetchableRecord & DatabaseValueConvertible tests
2018-10-28 19:16:55 +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é
f303664808
Cleanup
2018-10-28 16:20:57 +01:00
Gwendal Roué
e0a9cced4a
First tests for ValueObservation: focus on reducers
2018-10-28 13:27:43 +01:00
Gwendal Roué
09581c6ae0
ValueObservation factory requires a DatabaseRegionConvertible. Introduce AnyDatabaseRegionConvertible.
2018-10-28 11:45:49 +01:00
Gwendal Roué
fc3aca792f
Replace InitialDispatch with ValueScheduling
2018-10-28 11:28:31 +01:00
Gwendal Roué
a043c4c29e
QoS are hard
2018-10-27 23:01:24 +02:00
Gwendal Roué
ec5451ee70
Cleanup
2018-10-27 17:18:03 +02:00
Gwendal Roué
7c4462641e
ValueObservation creation is always done with a factory initializer
2018-10-27 17:16:03 +02:00
Gwendal Roué
82efe7ca23
AnyValueReducer
2018-10-27 17:06:23 +02:00
Gwendal Roué
052d2e3008
Value (string, int, etc.) observation, with uniquing
2018-10-27 16:41:42 +02:00
Gwendal Roué
de227bdce1
Bake uniquing right into ValueObservation: introduce ValueReducer
2018-10-27 16:12:42 +02:00
Gwendal Roué
697b2af61d
Wrap long lines
2018-10-27 05:11:19 +02:00
Gwendal Roué
ff4f6f3b12
Cleanup
2018-10-27 04:59:24 +02:00
Gwendal Roué
31b688d801
ValueObservationn has a QoS
2018-10-27 04:24:17 +02:00
Gwendal Roué
f694437f5b
Add missing public qualifiers
2018-10-27 04:23:45 +02:00
Gwendal Roué
69853d7901
Now that user implementations of DatabaseWriter are no longer supported...
...
...stop pretending we have to implement concurrentRead
on top of the deprecated readFromCurrentState.
And this fixes #419 :-)
2018-10-26 16:53:30 +02:00
Gwendal Roué
9c71356e3d
Honor ValueObservation.readonly
2018-10-26 09:10:26 +02:00
Gwendal Roué
2341523c41
API cleanup
2018-10-26 08:50:59 +02:00
Gwendal Roué
0df4815086
Move ValueObservation support to DatabaseReader
2018-10-25 20:39:04 +02:00