Commit Graph
1613 Commits
Author SHA1 Message Date
Gwendal Roué 303a0cc150 immediateInitialValue is a better name 2020-03-28 19:49:07 +01:00
Gwendal Roué 5d196c449d Value Observation does no longer retain DatabaseWriter 2020-03-28 17:11:57 +01:00
Gwendal Roué 88ddce5fac Make sure the observer is cancelled on error 2020-03-28 11:42:53 +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é ff104686f6 Read-only observation: support for cancellation 2020-03-28 07:45:55 +01:00
Gwendal Roué 97d06a0fae Fix typo 2020-03-27 20:36:29 +01:00
Gwendal Roué 469814985e Decrease nesting 2020-03-27 19:55:36 +01:00
Gwendal Roué f16105ad03 Add missing cancellation checks 2020-03-27 19:53:01 +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é b4b5d9b602 Simplify ValueObservation scheduling 2020-03-27 08:27:30 +01:00
Gwendal Roué e68bd077ee Remove all observationForCount/All/First methods 2020-03-25 21:44:10 +01:00
Gwendal Roué 56f332122d The observed region is always recorded 2020-03-24 22:59:07 +01:00
Gwendal Roué dfd5dd2478 Add missing import for SPM 2020-03-24 22:55:18 +01:00
Gwendal Roué 3ee231afd3 Cleanup _OptionalProtocol 2020-03-21 14:36:48 +01:00
Gwendal Roué 2bb894108c Use the prependingConcurrentFetch flag 2020-03-21 14:36:48 +01:00
Gwendal Roué 2b78a646ed Mor preparation for initiial concurrent fetch of ValueObservation in a DatabasePool 2020-03-21 14:36:48 +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é 5a884ad93d Common ValueObservation code for all read-only database accessors 2020-03-21 14:36:48 +01:00
Gwendal Roué dfa40ea18f Rename ValueObservation.fetchFirst to fetchValue
"First", in Swift, hints that the result is optional. But the result of this function is no longer optional.
2020-03-12 07:34:43 +01:00
Gwendal Roué 936c92eba6 All value reducers must emit an initial value
This disqualifies compactMap as a valid ValueObservation transformation: it has been removed.

This simplifies implementation as well.
2020-03-12 07:18:40 +01:00
Gwendal Roué 5e0535d511 ValueReducer creation does not need database access 2020-03-11 22:00:07 +01:00
Gwendal Roué f80c5ce348 Make the ValueReducer protocol unavailable
# Conflicts:
#	GRDB/ValueObservation/ValueReducer/ValueReducer.swift
2020-03-11 21:38:20 +01:00
Gwendal Roué 2f4187b084 DatabaseWriter.remove(transactionObserver:) can run from the writer queue 2020-03-10 22:06:08 +01:00
Gwendal Roué d66f2c8cfd Simplify ValueObservation starting process 2020-03-10 20:50:06 +01:00
Gwendal Roué 6f239a5ad3 All ValueObservationScheduling cases now trigger an initial fetch 2020-03-10 19:42:58 +01:00
Gwendal Roué 19061934ce SE-0242: Synthesize default values for the memberwise initializer
...and more initializers cleanup
2020-03-09 08:49:06 +01:00
Gwendal Roué 9aa67f9db9 SE-0255: Implicit returns from single-expression functions 2020-03-08 23:12:46 +01:00
Gwendal Roué 7865b0a2ee SE-0249: Key Path Expressions as Functions 2020-03-08 19:58:51 +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é b9d4a5215a Remove deprecated DatabaseMigrator methods 2020-03-08 17:13:31 +01:00
Gwendal Roué 456d2aee75 Remove deprecated SQLExpressionLiteral 2020-03-08 16:57:29 +01:00
Gwendal Roué 02890a6d3a Remove deprecated SQLLiteral.mapSQL(_:) 2020-03-08 16:28:44 +01:00
Gwendal Roué 0f503fe0db Remove deprecated FetchRequest.prepare(_: forSingleResult:) 2020-03-08 16:18:55 +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é ee64f8ff9d Rename statement argument methods 2020-03-04 08:43:31 +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é ea421865aa Improve barrierWriteWithoutTransaction documentation 2020-03-01 11:34:58 +01:00
Gwendal Roué ce0df653f4 Expose Database.erase() 2020-02-29 17:19:08 +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é 8c3274bd3c Cleanup 2020-02-14 12:36:36 +01:00
Gwendal Roué 591384576f SQLOrderingLiteral (and prevent reversing of requests ordered by literal) 2020-02-14 12:31:54 +01:00
Gwendal Roué c64b2d1032 Cleanup 2020-01-25 16:18:12 +01:00
Gwendal Roué 3ccfcb61ce Cleanup SQLLiteral elements 2020-01-25 16:11:17 +01:00
Gwendal Roué e4c6029e72 Cleanup internal APIs 2020-01-25 14:37:32 +01:00