Commit Graph
1840 Commits
Author SHA1 Message Date
Gwendal Roué 2a5626efea Replace if let x = x with if let x 2022-08-22 20:40:00 +02:00
Gwendal Roué 422e0ae85a BREAKING: Handles both commits and rollbacks
Replace afterNextTransactionCommit(_:) with afterNextTransaction(onCommit:onRollback:)
2022-08-21 21:22:34 +02:00
Gwendal Roué 0ed9367b26 BREAKING: DatabaseCursor no longer exposes its prepared statement 2022-08-21 21:22:34 +02:00
Gwendal Roué eda403bd31 StatementArguments is Hashable 2022-08-21 21:22:34 +02:00
Gwendal Roué 5243db7fbc Spelling 2022-08-21 21:22:34 +02:00
Gwendal Roué 4ced8c78e7 Less "iff" (some people think this is a typo)
iff = if and only if
2022-08-21 21:22:34 +02:00
Gwendal Roué c38d903f4d Make RequestProtocols.swift easier to read 2022-08-21 21:22:34 +02:00
Gwendal Roué 27b65c9a80 BREAKING: Starting DatabaseRegionObservation returns a cancellable 2022-08-21 21:22:34 +02:00
Gwendal Roué 4c73456f86 Make SQL.swift easier to read 2022-08-21 21:22:34 +02:00
Gwendal Roué 84940af3dc Cleanup statement separator character set 2022-08-21 21:22:34 +02:00
Gwendal Roué e0786537db BREAKING: replace Int32 with CInt everywhere it is possible 2022-08-21 21:22:34 +02:00
Gwendal Roué 496c2ae359 Make Database+Statements.swift easier to read 2022-08-21 21:22:34 +02:00
Gwendal Roué 5b7c58faf4 Make Database+Schema.swift easier to read 2022-08-21 21:22:34 +02:00
Gwendal Roué 0658808028 Make Database.swift easier to read
Enhance documentation, and rename some types and variables.
2022-08-21 21:22:34 +02:00
Gwendal Roué fb6ea57d74 Don’t setup database observation in read-only connections.
Observation of read-only connections has turned useless since read-only transactions are no longer reported to TransactionObserver, in #1213
2022-08-21 21:22:34 +02:00
Gwendal Roué 0879311646 Make TransactionObserver.swift easier to read
Add some documentation, and rename some types and variables.
2022-08-21 21:22:34 +02:00
Gwendal Roué 9a9406a69d SE-0353: Constrained Existential Types
https://github.com/apple/swift-evolution/blob/main/proposals/0353-constrained-existential-types.md
2022-08-21 21:22:34 +02:00
Gwendal Roué b2eafd4a13 SE-0361: Extensions on bound generic types
https://github.com/apple/swift-evolution/blob/main/proposals/0361-bound-generic-extensions.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 36892fee55 BREAKING: Bump minimum SQLite version to 3.19.3 2022-08-21 21:22:34 +02:00
Gwendal Roué c26ed6c280 NEW: throw decoding errors 2022-08-21 21:22:34 +02:00
Gwendal Roué 895964de16 BREAKING: Throwing FetchableRecord.init(row:) 2022-08-21 21:22:34 +02:00
Gwendal Roué 2011776cbe Remove misleading comments 2022-08-21 21:22:34 +02:00
Gwendal Roué 33a039717c Refer to UIApplication notifications by their names
It looks like FB9801372 was fixed
2022-08-21 21:22:34 +02:00
Gwendal Roué 55445dcc7c NEW: RangeReplaceableCollection.append(contentsOf: cursor) 2022-08-21 21:22:34 +02:00
Gwendal Roué dba7f1b2dc BREAKING: turn Cursor.isEmpty into a property
https://github.com/apple/swift-evolution/blob/main/proposals/0310-effectful-readonly-properties.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 11a6d53d8a SE-0326: closure result type inference
https://github.com/apple/swift-evolution/blob/main/proposals/0326-extending-multi-statement-closure-inference.md
2022-08-21 21:22:34 +02:00
Gwendal Roué a9fcf1b9c1 SE-0335, SE-0341, SE-0346, SE-0352, SE-0358: some, any, primary associated types 2022-08-21 21:22:34 +02:00
Gwendal Roué c0c6b34869 SE-0346: primary associated types 2022-08-21 21:22:34 +02:00
Gwendal Roué dd55175978 SE-0345: if let x { }
https://github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 58293befc9 BREAKING: Optional is a database value like others 2022-08-21 21:22:34 +02:00
Gwendal Roué 458e1e2675 BREAKING: throwing DatabaseQueue() initializer
As a consequence, FTS3.tokenize(_:) is a throwing method as well.
2022-08-21 21:22:33 +02:00
Gwendal Roué 6f0d45eedb BREAKING: throwing DatabaseWriter.barrierWriteWithoutTransaction
It used to be rethrowing, but it was then unable to deal with closed databases.

The async version is modified accordingly: it accepts a Result<Database, Error>, instead of a raw Database.

DatabaseMigrator.asyncMigrate is impacted as well: it accepts a Result<Database, Error>, instead of a (Database, Error?) tuple.
2022-08-21 19:21:57 +02:00
Gwendal Roué fe225fe452 BREAKING: Remove deprecated methods 2022-08-21 19:21:57 +02:00
Gwendal Roué 23cbf13af0 Swift 5.7 required: Availability checks 2022-08-21 19:21:57 +02:00
Gwendal Roué 6da7d47394 Swift 5.7 required: Remove compiler checks 2022-08-21 19:21:57 +02:00
Gwendal Roué df0ae43c5f Swift 5.7 required: Sendable 2022-08-21 19:21:26 +02:00
Gwendal Roué 9d7e27ced1 Add support for index origin 2022-07-25 08:07:27 +02:00
Gwendal Roué 8dc0168841 Database.sqliteConnection setter is private 2022-07-24 15:14:35 +02:00
Gwendal Roué c1e752132c Document why DatabasePool.releaseMemory() needs a barrier 2022-07-09 14:28:09 +02:00
Gwendal Roué 23fa42a3e4 Make Database.releaseMemory() public
This allows us to document how to release memory asynchronously with a DatabaseQueue (in the next commit)
2022-07-09 13:55:39 +02:00
Gwendal Roué 07eaeee123 automaticMemoryManagement tests check for actual connection closing 2022-07-09 13:39:39 +02:00
Gwendal Roué 0bfb4de02d Enhance DatabaseQueue automatic memory management
We have async methods, now: no need to use a global dispatch queue.
2022-07-09 13:39:11 +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é cc5196757d Fix for Xcode 12.4 2022-06-30 19:22:23 +02:00
Gwendal Roué 38c0d68db7 WALSnapshot
SQLITE_ENABLE_SNAPSHOT is available from Xcode 14 :-)
2022-06-24 16:48:38 +02:00
Daniel Inoa 432670e13a Fix documentation typo in Row 2022-06-12 05:14:28 -07:00
Gwendal Roué 3f7adec072 Default qos is .userInitiated
Addresses #1234
2022-06-08 08:12:47 +02:00
Gwendal Roué 952ee0a137 Rename Pool.async to asyncGet 2022-05-25 17:25:43 +02:00