Michael Allman
f012c011b1
Import the Foundation framework in DatabaseReader.swift, which is required to get the Progress class
2021-12-08 09:37:10 -08:00
Michael Allman
f829d46b7f
Change default backup page step size from 5 to 100, which is the value used in the sqlite3 cli .backup command
2021-12-08 09:37:10 -08:00
Michael Allman
ab6f18e46d
Initial commit of code to implement progress-reporting database backups
2021-12-08 09:37:10 -08:00
Gwendal Roué
01f4c04c4d
DatabaseReader is Sendable
2021-12-08 18:12:28 +01:00
Gwendal Roué
61b0df8017
Enable async APIs on Xcode 13.2+ only
...
Xcode 13.1 won't have access to async apis. This simplifies our availability checks.
The techniques were inspired from:
- https://github.com/swift-server/guides/blob/main/docs/concurrency-adoption-guidelines.md#api-design
- https://github.com/swift-server/guides/blob/main/docs/concurrency-adoption-guidelines.md#backwards-compatibility-of-declarations-and-checked-swift-concurrency
2021-12-08 11:17:40 +01:00
Gwendal Roué
6ec3ebc398
Merge branch 'development' into dev/async
2021-12-06 18:04:35 +01:00
Gwendal Roué
6240585a03
Make sure ValueObservation fetches in an isolated transaction
...
Previously, ValueObservation could fetch in a non-isolated way. When an external connection would commit changes, we could fetch inconsistent values. Here we make sure ValueObservation always fetch in an isolated way.
2021-12-02 09:46:02 +01:00
Gwendal Roué
1738ad34cd
Extract the Concurrency Guide
2021-11-06 12:23:54 +01:00
Gwendal Roué
15b38353bc
Add experimental warning to the documentation of async methods
2021-10-31 19:35:05 +01:00
Gwendal Roué
1a87faacfa
Merge branch 'development' into dev/async
2021-10-31 18:32:03 +01:00
Gwendal Roué
20cb50f52d
Public close() method
2021-10-31 18:12:13 +01:00
Gwendal Roué
c755dc70ef
Restrict async/await to Xcode 13.1+
2021-10-30 20:09:39 +02:00
Gwendal Roué
0ead20cdd6
All async apis are experimental
2021-10-17 13:26:41 +02:00
Gwendal Roué
2ad6131d08
Require canImport(_Concurrency)
...
This fixes the build for macOS 11.5
2021-10-17 13:26:41 +02:00
Gwendal Roué
1f73c20ae2
DatabaseWriter async methods
...
write, writeWithoutTransaction, barrierWriteWithoutTransaction, erase, vacuum, vacuum(into:)
2021-10-17 13:24:10 +02:00
Gwendal Roué
a827188881
async DatabaseReader.unsafeRead
2021-10-17 13:23:34 +02:00
Gwendal Roué
64be4763f2
async DatabaseReader.read
2021-10-17 13:23:34 +02:00
Gwendal Roué
ba88a150c0
Improve inline doc of database access methods
2021-10-11 15:50:06 +02:00
hlst
de0709163c
Fix a tiny typo
2021-04-05 06:31:56 +08:00
Gwendal Roué
836efb120f
Xcode 12.3 formatting
2020-12-23 12:13:05 +01:00
Gwendal Roué
3c38aa1996
Functions, Collations, and tokenizers are no longer available on DatabaseQueue, Pool, and Snapshot
2020-09-06 13:18:58 +02:00
Gwendal Roué
07092169bf
Documentation
2020-07-12 14:17:58 +02:00
Gwendal Roué
90e7449d6a
Documentation
2020-07-11 19:21:33 +02:00
Gwendal Roué
a0ce362197
Combine publishers
2020-06-25 19:25:29 +02:00
Gwendal Roué
4e8b231c42
Rename handleEvents arguments
2020-06-22 14:23:33 +02:00
Gwendal Roué
5c4b282e27
Refactor ValueObservation events handling
2020-06-21 09:17:12 +02:00
Gwendal Roué
dd76cdffec
ValueObservation.handleEvents
2020-06-20 19:57:51 +02:00
Gwendal Roué
0372c1dd63
Complete #747 : export the underlying SQLite library
2020-04-12 07:27:50 +02:00
Gwendal Roué
f27d6b07c0
Cleanup
2020-04-11 20:45:00 +02:00
Gwendal Roué
8ef4c9b241
Remove convenience Result.tryMap
2020-04-09 17:45:12 +02:00
Gwendal Roué
27120643b9
SE-0255: Implicit returns from single-expression functions
2020-04-09 17:16:23 +02:00
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é
90d5316781
Hide ValueObservationScheduler implementation
2020-03-28 19:53:18 +01:00
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é
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é
dfd5dd2478
Add missing import for SPM
2020-03-24 22:55:18 +01:00
Gwendal Roué
1c59278115
Prefer dbResult argument name for async read closures
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é
f80c5ce348
Make the ValueReducer protocol unavailable
...
# Conflicts:
# GRDB/ValueObservation/ValueReducer/ValueReducer.swift
2020-03-11 21:38:20 +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é
9578f984ec
Remove useless #if compiler/swift checks
2020-03-08 13:42:44 +01:00
Gwendal Roué
ce0df653f4
Expose Database.erase()
2020-02-29 17:19:08 +01:00
Gwendal Roué
6656f72782
Rename "lock prevention" to "suspension"
2019-12-12 08:47:49 +01:00