Gwendal Roué
c1e752132c
Document why DatabasePool.releaseMemory() needs a barrier
2022-07-09 14:28:09 +02:00
Gwendal Roué
07eaeee123
automaticMemoryManagement tests check for actual connection closing
2022-07-09 13:39:39 +02:00
Gwendal Roué
d72b7109ad
DatabasePool automatic memory management no longer uses any reader barrier
...
This fixes the failing `testDatabasePoolDoesNotPreventConcurrentReadsOnPressureEvent` test
2022-07-09 13:39:11 +02:00
Gwendal Roué
e1a63a4c05
Introduce DatabasePool.releaseMemoryEventually
2022-07-09 13:33:01 +02:00
George Nachman
bbe94a9607
Make memory management optional.
...
Memory management may not be desirable for all
users of GRDB. `DatabasePool.releaseMemory`
creates a barrier which may cause normally fast
readers to block for a long time. If this is not a
desirable tradeoff, the new
`automaticMemoryManagement` flag in
`Configuration` allows you to disable this feature
of GRDB.
2022-07-05 15:27:55 -07:00
Gwendal Roué
952ee0a137
Rename Pool.async to asyncGet
2022-05-25 17:25:43 +02:00
Gwendal Roué
ee92db9d6f
Pool has a QoS
2022-05-25 17:21:50 +02:00
Gwendal Roué
9ed309b470
Fix failing tests for number of threads created by DatabasePool
2022-05-24 19:31:22 +02:00
Gwendal Roué
209192d3a5
Require Swift 5.6 Compiler for Concurrency Support
2022-04-13 23:07:33 +02:00
Gwendal Roué
6ab3fea8fb
Refactor ValueObservation
2022-03-17 18:44:30 +01:00
Gwendal Roué
287ceb8b07
Documentation & cleanup
2022-03-17 18:44:30 +01:00
Gwendal Roué
09f7d4d952
Complete #1161
2022-01-30 15:27:11 +01:00
Gwendal Roué
ed4471c5b9
Configuration.writeTargetQueue
2022-01-29 17:45:21 +01:00
Gwendal Roué
09922c34ff
Code formatting
2022-01-23 12:24:34 +01:00
Gwendal Roué
1b62e06c4a
Expose Sendable conformance to Swift 5.5
...
But async apis are still only exposed to Swift 5.5.2.
Sendable conformances are helpful for users of Xcode < 13.2.
2021-12-10 08:08:47 +01:00
Gwendal Roué
01f4c04c4d
DatabaseReader is Sendable
2021-12-08 18:12:28 +01:00
Gwendal Roué
33d9ca0e97
UIApplication notification names are isolated to @MainActor
...
I believe this is incorrect: FB9801372 (UIApplication.didReceiveMemoryWarningNotification should not be declared @MainActor)
Meanwhile, just use the string version.
A workaround based on a MainActor-isolated task can't work due to conflict between compiler version and minimum iOS target:
#if compiler(>=5.5) && canImport(_Concurrency)
if #available(...) { // Check for availability of concurrency runtime
Task { @MainActor [weak self] in
NotificationCenter.default.addObserver(..., name: UIApplication.didReceiveMemoryWarningNotification, object: nil)
}
} else {
// IMPOSSIBLE CASE: No access to Task, no access to notification names
}
#else
NotificationCenter.default.addObserver(..., name: UIApplication.didReceiveMemoryWarningNotification, object: nil)
#endif
2021-12-08 12:48:19 +01:00
Gwendal Roué
6ec3ebc398
Merge branch 'development' into dev/async
2021-12-06 18:04:35 +01:00
Gwendal Roué
bb2ce74125
Add helper method Database.isolated(readOnly:)
2021-12-02 09:45:28 +01:00
Gwendal Roué
f74ce91a17
Merge branch 'development' into dev/async
...
# Conflicts:
# CHANGELOG.md
# Documentation/Concurrency.md
# README.md
2021-11-07 11:47:01 +01:00
Gwendal Roué
7af3858ff6
More robust DatabasePool.close() test
2021-11-07 08:17:48 +01:00
Gwendal Roué
7897c6a799
asyncUnsafeRead handle closed connection
2021-11-01 07:25:26 +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é
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é
ba88a150c0
Improve inline doc of database access methods
2021-10-11 15:50:06 +02:00
Zev Eisenberg
8b060e6b09
Add angle brackets to URLs to make them clickable in Xcode's rendered documentation.
2021-07-20 20:53:58 -04:00
Gwendal Roué
b13922b76e
Database schema cache distinguishes the main from the temp schema
...
Addresses https://github.com/groue/GRDB.swift/pull/946#issuecomment-805756799
2021-03-27 14:50:25 +01:00
Gwendal Roué
c9c652dddc
DatabaseMigrator async migrations
2021-03-20 13:25:43 +01:00
Gwendal Roué
836efb120f
Xcode 12.3 formatting
2020-12-23 12:13:05 +01:00
Gwendal Roué
f84e25f929
Remove dependency on SQLITE_ENABLE_SNAPSHOT
...
Address #845 and #846
2020-10-06 08:30:41 +02:00
Gwendal Roué
7a2c1413fe
Fix DatabaseSnapshot
2020-09-06 13:40:03 +02: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é
86b9616dd7
DatabasePool readers don't invalidate their database schema cache until schema is actually changed.
2020-07-25 18:20:43 +02:00
Gwendal Roué
07092169bf
Documentation
2020-07-12 14:17:58 +02:00
Gwendal Roué
ae41859bbb
Cleanup
2020-07-11 10:57:24 +02:00
Gwendal Roué
68785d1c2d
Hide _SQLAssociation
2020-07-05 16:21:28 +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
Alexandre Colucci
f97e0cc540
Fix inline documentation for the setupMemoryManagement() function. In GRDB 5.0.0 and later, the parameter 'application' has been removed.
2020-06-20 12:09:59 +02:00
Gwendal Roué
ec0e8672be
Documentation, cleanup
2020-06-14 11:03:24 +02:00
Gwendal Roué
9215f88e7f
Documentation, cleanup, and checkpoint prevention
2020-06-14 10:47:27 +02:00
Gwendal Roué
510daa84a7
This is hard
2020-06-14 06:36:53 +02:00
Gwendal Roué
eacf48fef3
More snapshot-based optimization of ValueObservation with DatabasePool
...
This time, for the .immediate scheduler.
2020-06-14 06:34:08 +02:00
Gwendal Roué
0dee6425d1
Fix free function
2020-06-14 05:36:33 +02:00
Gwendal Roué
842846dbc4
Documentation
2020-06-14 05:36:12 +02:00
Gwendal Roué
f1e65fbb2c
Optimization of ValueObservation with DatabasePool thanks to SQLITE_ENABLE_SNAPSHOT
...
The difficulty is that system <sqlite3.h> does not contain the expected declarations, even when SQLite is compiled with SQLITE_ENABLE_SNAPSHOT :-(
Since snapshots are not exposed in any public API, we don't bother dealing with availability checks. We just add the missing declarations, and rely on the linker in order to spot eventual errors.
This commit is likely to break Linux builds, though.
2020-06-13 20:14:40 +02:00
Gwendal Roué
372996deb3
TODO
...
# Conflicts:
# TODO.md
2020-06-13 13:36:51 +02:00