Commit Graph
1961 Commits
Author SHA1 Message Date
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é 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é 49a66e197b Foster some FetchRequest<...> in the documentation 2022-08-21 21:22:34 +02:00
Gwendal Roué 80ec31f588 BREAKING: remove DerivableRequest.limit(_:offset:) 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é a15f731042 BREAKING: remove Record.copy()
This will allow FetchableRecord.init(row:) to throw
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é 180c8975ac Stop using #filePath 2022-08-21 21:22:34 +02:00
Gwendal Roué 7ffc332327 BREAKING: replace selectID() with selectPrimaryKey(as:)
Since Optional is a database value like others, selectID would be a request of optionals for records with an optional ID type:

    struct Player: Identifiable, MutablePersistableRecord {
        var id: Int64?
    }

    Player.selectID() // QueryInterface<Int64?>

This is not good, because primary keys are not null. And those requests would fetch impractical types such as [Int64?], Set<Int64?>, Int64??.

Instead, we introduce selectPrimaryKey(as:), which allows the user to provide the desired type.

    Player.selectPrimaryKey(as: Int64.self) // QueryInterface<Int64>
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é 86de843bda Swift 5.7 required: Xcode 14 updates 2022-08-21 19:21:57 +02:00
Gwendal Roué 20dcab75c7 Swift 5.7 required: SPM resources 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é fcb037bdf0 Swift 5.7 required: Bump deployment targets 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é df7ba20ff2 Test columnInfos(in:) for views 2022-07-24 15:17:20 +02:00
Gwendal Roué e0766449f1 Fix compilation error on iOS Xcode 13.3.1.app, macOS 12, Swift 5.6 2022-07-09 16:14:37 +02:00
Gwendal Roué 07eaeee123 automaticMemoryManagement tests check for actual connection closing 2022-07-09 13:39:39 +02:00
Gwendal Roué caab403282 Failing test for concurrent read on memory warning 2022-07-09 13:31:15 +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é 38c0d68db7 WALSnapshot
SQLITE_ENABLE_SNAPSHOT is available from Xcode 14 :-)
2022-06-24 16:48:38 +02:00
Gwendal Roué fd31632203 Bump GRDBPerformance dependencies 2022-05-26 13:31:48 +02:00
Gwendal Roué 4b7a9bbe7b CI: raise timeouts 2022-05-25 09:27:01 +02:00
Gwendal Roué 184d5aa4af CI: raise timeouts 2022-05-25 09:01:39 +02:00
Gwendal Roué 6c48e492d1 CI: raise timeouts 2022-05-24 21:58:46 +02:00
Gwendal Roué 26fedd2702 CI: raise timeouts 2022-05-24 20:47:34 +02:00
Gwendal Roué 00d1a80b31 Failing tests for number of threads created by DatabasePool 2022-05-24 19:31:09 +02:00
Gwendal Roué d8f2989542 Split SQLCipher clear/encrypted tests 2022-05-23 14:20:26 +02:00
Gwendal Roué 758f561fbf Raise timeout threshold for SQLCipher CI tests 2022-05-22 17:31:45 +02:00
Gwendal Roué c5eba4741d Test that read-only transactions are not notified 2022-04-30 15:42:57 +02:00
Gwendal Roué 06b5367053 Default transaction kind is .deferred in read-only connections
This applies to both connections open in read-only mode, and pragma query_only.
2022-04-30 14:29:31 +02:00
Gwendal Roué 819ee588c9 Failing test for #1209 2022-04-30 14:26:04 +02:00
Gwendal Roué 1b3f1ed393 Fix typo 2022-04-30 13:26:25 +02:00
Gwendal Roué 209192d3a5 Require Swift 5.6 Compiler for Concurrency Support 2022-04-13 23:07:33 +02:00
Gwendal Roué 9014b3ebd0 Fix #1192 2022-03-26 14:48:27 +01:00
Gwendal Roué 9b7b603a69 Documentation 2022-03-26 11:44:33 +01:00
Gwendal Roué 770484b78d Failing test for #1194 2022-03-26 11:33:10 +01:00
Gwendal Roué 62450b5817 Bump performance comparison dependencies 2022-03-22 18:00:21 +01:00