Commit Graph
143 Commits
Author SHA1 Message Date
Gwendal Roué d72000c6a3 Use scheduling paramater name for consistency with GRDBCombine and RxGRDB 2020-03-31 20:25:36 +02:00
Gwendal Roué 1bffc4f628 ValueObservation is cancellable 2020-03-29 16:06:24 +02:00
Gwendal Roué 5d196c449d Value Observation does no longer retain DatabaseWriter 2020-03-28 17:11:57 +01:00
Gwendal Roué 23d428290b Assume that error ends the observation, and have database pool always perform a concurrent initial fetch 2020-03-28 10:30:36 +01:00
Gwendal Roué 4309eaba64 Scheduling of fresh values is no longer an attribute of ValueObservation 2020-03-27 19:49:11 +01:00
Gwendal Roué 1c59278115 Prefer dbResult argument name for async read closures 2020-03-21 14:36:48 +01:00
Gwendal Roué 2824636650 Prepare for initiial concurrent fetch of ValueObservation in a DatabasePool 2020-03-21 14:36:48 +01:00
Gwendal Roué 9aa67f9db9 SE-0255: Implicit returns from single-expression functions 2020-03-08 23:12:46 +01:00
Gwendal Roué 00b0dc2a04 Remove availability checks for macOS 10.10 (forgotten in #719) 2020-03-08 19:08:15 +01:00
Gwendal Roué bfdd0696da Remove deprecated setupMemoryManagement methods 2020-03-08 16:08:12 +01:00
Gwendal Roué 130e510f8c Remove deprecated passphrase methods 2020-03-08 16:00:19 +01:00
Gwendal Roué 9578f984ec Remove useless #if compiler/swift checks 2020-03-08 13:42:44 +01:00
Gwendal Roué 7c684d06c1 Simplify schema cache management
We don't need EmptyDatabaseSchemaCache. It does not help unsafe reads to work better if concurrent writes modify the schema anyway.
2020-03-01 15:51:37 +01:00
Gwendal Roué 11f8807545 Make barrierWriteWithoutTransaction a requirement of DatabaseWriter 2020-02-29 16:01:45 +01:00
Gwendal Roué 9ed8cb3eff Fix Swiftlint warnings 2020-02-29 14:30:05 +01:00
Pakkito eb98f50891 Avoid breaking changes
- Deprecate setupMemoryManagement(application:)
- UIApplication is not available on watchOS, so instead of checking against `#if canImport(UIKit)` we use `#if os(iOS)`

Signed-off-by: Pakkito <pe@pierlis.com>
2020-02-28 18:00:16 +01:00
Pakkito 32675b38f1 Automatically setup memory management when UIKit is available
Signed-off-by: Pakkito <pe@pierlis.com>
2020-02-28 17:21:27 +01:00
Gwendal Roué 6656f72782 Rename "lock prevention" to "suspension" 2019-12-12 08:47:49 +01:00
Gwendal Roué 16025356bf Adapt lock prevention to the journal mode 2019-12-02 20:27:39 +01:00
Gwendal Roué b54a8f7fe8 DatabaseWriter.startPreventingExclusiveLock() 2019-12-01 17:59:49 +01:00
Gwendal Roué 0a83848cfc DatabaseReader.interrupt() 2019-11-30 15:35:11 +01:00
Gwendal Roué b9e2f35728 Deprecate change(passphrase:), and provide an alternative solution 2019-09-02 09:05:37 +02:00
Gwendal Roué df6bb8761c Swiftlint + whitespace 2019-07-01 08:57:53 +02:00
Gwendal Roué 335850c5fe Fix #554 2019-06-18 20:40:49 +02:00
Gwendal Roué dc2871d5eb DatabaseWriter.spawnConcurrentRead (experimental method) 2019-06-18 08:21:55 +02:00
Gwendal Roué 173c8af3ef asyncConcurrentRead documentation 2019-06-17 19:48:25 +02:00
Gwendal Roué 0ad819902d Tests for asyncRead, asyncWrite, asyncWriteWithoutTransaction 2019-06-13 13:42:31 +02:00
Gwendal Roué b715ca5eb8 DatabaseWriter.asyncWrite 2019-06-13 13:20:59 +02:00
Gwendal Roué bc7c3e5eb1 DatabaseReader.asyncRead 2019-06-13 08:45:49 +02:00
Gwendal Roué f120632e36 Rename unsafeAsyncWrite to asyncWriteWithoutTransaction
Hold on: a more complete set of async APIs will come eventually.
2019-06-13 05:25:56 +02:00
Gwendal Roué 44138c433f Refactor ValueObservation scheduling 2019-06-11 21:45:27 +02:00
Gwendal Roué 7183457217 Rename Future to DatabaseFuture 2019-03-14 06:43:40 +01:00
Gwendal Roué db67d3840b Principle of least astonishment: rrename argument label rawSQL to sql 2019-02-17 13:28:41 +01:00
Gwendal Roué c546c578ce fetchCursor/All/One(_:rawSQL:arguments:adapter:) 2019-02-17 13:28:40 +01:00
Gwendal Roué 59162d93de Rename Database.execute(_:String) to Database.execute(rawSQL:String) 2019-02-17 13:27:54 +01:00
Gwendal Roué 4489106bd6 Remove deprecated DatabaseWriter.readFromCurrentState 2019-02-08 10:16:17 +01:00
Gwendal Roué 3eb36768c6 Simplify iOS memory management, assuming swift(>=4.2) 2019-02-07 08:25:31 +01:00
Gwendal Roué f07eee3ca7 DispatchQueue creation cleanup 2018-12-01 16:22:05 +01:00
Gwendal Roué ff4f6f3b12 Cleanup 2018-10-27 04:59:24 +02:00
Gwendal Roué b9a878bb20 Cleanup 2018-09-11 08:56:29 +02:00
Gwendal Roué 9bfe893908 DatabaseWriter.concurrentRead replaces readFromCurrentState 2018-09-09 13:12:35 +02:00
Gwendal Roué ff595eeaef Compile with both Swift 4.1 and Swift 4.2 2018-08-30 16:34:30 +02:00
Gwendal Roué 7be6386689 Fix DatabaseQueue.write and unsafeReentrantRead throws/rethrows qualifier. 2018-08-16 08:27:05 +02:00
Gwendal Roué 342dcc5094 Confiiguration.label is used to name dispatch queues 2018-06-14 20:26:34 +02:00
Gwendal Roué 2e80db8aed Database dispatch queues now have labels 2018-06-14 13:36:42 +02:00
Gwendal Roué 1bf7f67008 Update inline documentation with singular table names 2018-05-01 20:32:18 +02:00
Gwendal Roué c9dc1223dd Harmonize dbQueue.writer with dbPool.writer 2018-04-15 20:14:25 +02:00
Gwendal Roué 090f872e80 Update documentation: don't mention dbQueue.inDatabase unless necessary 2018-04-15 18:09:34 +02:00
Gwendal Roué a46505e907 Cleanup 2018-04-15 14:30:12 +02:00
Gwendal Roué d78479e4af [WIP] DatabaseQueue.inDatabase runs inside a transaction 2018-04-13 08:56:03 +02:00