Commit Graph
65 Commits
Author SHA1 Message Date
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é f582683f20 Move remove(transactionObserver:) to DatabaseReader 2018-10-29 12:26:12 +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é 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é fc3aca792f Replace InitialDispatch with ValueScheduling 2018-10-28 11:28:31 +01:00
Gwendal Roué ec5451ee70 Cleanup 2018-10-27 17:18:03 +02:00
Gwendal Roué de227bdce1 Bake uniquing right into ValueObservation: introduce ValueReducer 2018-10-27 16:12:42 +02:00
Gwendal Roué ff4f6f3b12 Cleanup 2018-10-27 04:59:24 +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
Gwendal Roué b9a878bb20 Cleanup 2018-09-11 08:56:29 +02:00
Gwendal Roué 8c479a863a Documentation 2018-09-09 20:00:03 +02:00
Gwendal Roué 58a48b73ae concurrentRead documentation 2018-09-09 19:55:07 +02:00
Gwendal Roué 41629ec9aa Future.wait() must be called only once 2018-09-09 16:00:01 +02:00
Gwendal Roué 106812c02c Fix SPM 2018-09-09 13:42:35 +02:00
Gwendal Roué da58e228c0 Document Future 2018-09-09 13:18:15 +02:00
Gwendal Roué 9bfe893908 DatabaseWriter.concurrentRead replaces readFromCurrentState 2018-09-09 13:12:35 +02:00
Gwendal Roué d4590ff91f Fix DatabaseWriter.readFromCurrentState documentation 2018-07-13 09:45:59 +02:00
Gwendal Roué 91d0a453da DatabaseWriter.erase(): more robust error handling 2018-07-07 17:43:26 +02:00
Gwendal Roué e84b539de2 DatabaseWriter.erase(): don't mess with internal SQLite objects 2018-07-07 14:42:18 +02:00
Gwendal Roué a73be9c010 Fix databaseWriter.erase() with SQLCipher 2018-07-07 12:32:40 +02:00
Gwendal Roué a465f16ff7 databaseWriter.erase(), databaseWriter.vacuum() 2018-07-06 13:58:55 +02:00
Gwendal Roué 1bf7f67008 Update inline documentation with singular table names 2018-05-01 20:32:18 +02:00
Gwendal Roué 563a4d5c71 Introduce DatabaseWriter.writeWithoutTransaction 2018-04-11 20:03:18 +02:00
Gwendal Roué 78e6241d16 DatabaseWriter.write now guarantees that eventual concurrent readers don't see any changes until all changes are executed. DatabasePool.write thus wraps changes in a transaction. 2018-04-11 20:03:18 +02:00
Gwendal Roué 2289ed9d95 Cleanup Jazzy documentation from most redundant definitions and experimental APIs 2018-01-21 16:57:43 +01:00
Gwendal Roué 94715130fc DatabaseWriter.readFromCurrentState(_:) now fails with a fatal error if a transaction is currently opened 2018-01-06 09:19:26 +01:00
Gwendal Roué caf051f19d Improve jazzy documentation layout 2017-10-31 13:37:48 +01:00
Gwendal Roué 3fce1e00c9 Introduce AnyDatabaseReader and AnyDatabaseWriter 2017-09-10 13:37:48 +02:00
Gwendal Roué 8ccc23333d Replace DatabaseCursor with new concrete cursors RowCursor, StatementColumnCursor, NullableStatementColumnCursor, and StatementCursor. 2017-08-23 08:16:30 +02:00
Gwendal Roué 90a46f6556 Introduce TransactionObservationExtent 2017-06-20 07:54:19 +02:00
Gwendal Roué ce4c20b112 Replace DatabaseWriter.availableDatabaseConnection with unsafeReentrantWrite() 2017-05-22 18:10:19 +02:00
Gwendal Roué 17a49b5d8c New public property: DatabaseWriter.availableDatabaseConnection. This new API opens the door to reentrant uses of the database, a much needed tool for RxGRDB. 2017-04-06 11:02:49 +02:00
Gwendal Roué 1e362fdd53 Prefer write { $0... } over write { db in db... } for one liners 2017-03-26 17:55:06 +02:00
Gwendal Roué 28221e398e Documentation 2016-12-02 14:23:17 +01:00
Gwendal Roué b8d924ab6f Restore DatabasePool in a stable state 2016-12-01 19:17:19 +01:00
Gwendal Roué b58a4e90da WIP DatabaseWriter/DatabaseReader improvements 2016-12-01 18:13:00 +01:00
Gwendal Roué f781da41a4 WIP: the recent failing tests of DatabasePool.readFromCurrentState, a paramount brick of FetchedRecordsController, have led to a refactoring of the DatabaseWriter protocol, and DatabasePool.write { ... } always executing a transaction. 2016-12-01 14:12:20 +01:00
Gwendal Roué bd32afbed2 Rename DatabaseWriter.readFromWrite to readFromCurrentState 2016-12-01 08:55:47 +01:00
Gwendal Roué a8e266377c Documentation 2016-11-29 12:02:29 +01:00
Gwendal Roué 268080cbc5 #147: FetchedRecordsController.performFetch() can now throw database errors; remove work around for SR-2623 2016-11-27 08:19:43 +01:00
Gwendal Roué 195c201f87 #147: DatabasePool.read(_:) and DatabasePool.nonIsolatedRead(_:) can now throw database errors. 2016-11-26 23:44:14 +01:00