GRDBCIPHER is now just a marker for importing SQLCipher with CocoaPods.
Also, enable all APIs that used to be disabled with SQLCipher, and skip tests that require a specific SQLite version.
If we don't have warnings about explicit nil initialization, then we have a warning about the name of a disabled rule which is now deprecated. In all cases, we have a warning.
So let's just write 2025 Swift, ignore that rule, and call it a day.
We now recommend:
enum Columns {
static let id = Column("id")
static let title = Column("title")
static let latitude = Column("latitude")
static let longitude = Column("longitude")
}
Instead of the previous recommendation:
enum Columns: String, ColumnExpression {
case id, title, latitude, longitude
}
This is because SE-0438 does not support Metatype Keypaths for enums. A request like `Place.order(\.title)` does not compile with a String enum.
This reverts 7ffc332327
At the time, selectID was replaced with selectPrimaryKey(as:) because:
> 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??.
This problem is reintroduced, but we now recommend against optional ids in https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/recordrecommendedpractices. And record with optional ids can use selectPrimaryKey(as:).
This allows the user to call those methods with an Array, or any other collection at hand (including lazy ones)
This change makes `return coalesce(columns.lazy.map { $0.name })` iterate lazily. Before this commit, `map` was returning a non-lazy Array.
We were frequently turning those sequences into an Array in order to check their emptiness, and generally were not sure we'd iterate a sequence only once.
Also use `some Sequence` and `some Collection` whenever possible.