Gwendal Roué
87b236dfe0
selectID
...
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:).
2025-02-11 20:47:49 +01:00
Gwendal Roué
46e15616a7
[BREAKING] macOS 10.15+
2024-09-21 14:28:24 +02:00
Gwendal Roué
e4a4735494
[BREAKING] tvOS 13+
2024-09-21 13:57:35 +02:00
Gwendal Roué
8c40592955
[BREAKING] iOS 13+
2024-09-21 13:57:23 +02:00
Gwendal Roué
55cdb4e9a9
DatabaseMigrator is Sendable
2024-08-25 16:26:38 +02:00
Gwendal Roué
79cb862478
[BREAKING] watchOS 7+
...
Rationale: https://github.com/groue/GRDB.swift/issues/1472#issuecomment-1960696836
2024-08-24 15:45:38 +02:00
Gwendal Roué
7a7ee554c7
OrderedRequest.withStableOrder()
2023-10-12 09:17:50 +02:00
Gwendal Roué
d3c289a320
Availability checks cleanup
2023-01-22 12:37:40 +01:00
baegteun
a9feac1339
♻️ :: OSX -> macOS in Availability Check
2023-01-17 13:58:37 +09:00
Gwendal Roué
2bde3e11bc
Tests for find(_🔑 ) and find(_🆔 )
2022-11-30 21:39:44 +01:00
Gwendal Roué
df3bd46346
Rename PersistenceError to RecordError
2022-11-30 19:11:07 +01:00
Gwendal Roué
37f0a0bb9a
BREAKING: throwing EncodableRecord.encode(to:)
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é
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é
046564dab6
Fix #991
2021-06-19 13:05:24 +02:00
Gwendal Roué
09899e9bcf
filter(id:) does not accept optionals
2021-03-28 06:48:22 +02:00
Gwendal Roué
55c0abef8b
Tests for id filtering of Identifiable types
2021-03-27 19:46:03 +01:00
Gwendal Roué
94d1134ec2
fetchSet
2020-07-12 10:49:47 +02:00
Gwendal Roué
2201026ce8
Introduce FastPrimaryKeyExpression, drop SQLPrimaryKeyExpression
...
Also, don't let the user access this expression, so that he does not attempt at decoding it. Its only purpose is to generate efficient SQL.
2020-07-01 20:40:11 +02:00
Gwendal Roué
c4ab23761e
QueryInterfaceRequest.selectPrimaryKey(as:)
2020-06-15 17:02:00 +02:00
Gwendal Roué
c82dbb35ad
SQLLiteral and SQLRequest no longer have sql and arguments properties
2020-04-29 13:52:29 +02:00
Gwendal Roué
d60fe3c22f
Replace import GRDBCustomSQLite with import GRDB
2020-04-04 16:44:01 +02:00
Gwendal Roué
9aa67f9db9
SE-0255: Implicit returns from single-expression functions
2020-03-08 23:12:46 +01:00
Gwendal Roué
ab000d7a4f
Remove useless expression parenthesis from SQL
2019-05-26 20:08:13 +02:00
Gwendal Roué
1c1ee4e92a
GRDBCipher is no longer. Long live GRDB.swift/SQLCipher.
2019-04-19 13:11:55 +02:00
Gwendal Roué
e3a0935914
Add SQL tests for all record testFetchOne…() methods
...
We usually update all those tests together
2019-04-17 14:01:16 +02:00
Gwendal Roué
63192e2b75
Refactor PersistenceError.recordNotFound
2019-02-25 20:17:49 +01:00
Gwendal Roué
db67d3840b
Principle of least astonishment: rrename argument label rawSQL to sql
2019-02-17 13:28:41 +01:00
Gwendal Roué
c546c578ce
fetchCursor/All/One(_:rawSQL:arguments:adapter:)
2019-02-17 13:28:40 +01:00
Gwendal Roué
59162d93de
Rename Database.execute(_:String) to Database.execute(rawSQL:String)
2019-02-17 13:27:54 +01:00
Gwendal Roué
7e6de4fbd0
Test TableRequest.orderByPrimaryKey()
2018-06-05 22:46:24 +02:00
Gwendal Roué
9b27c0c651
WIP TableMapping.filter(key: [:]) and TableMapping.filter(keys: [[:], ])
2018-01-11 19:34:28 +01:00
Gwendal Roué
96159bd09c
RowConvertible.fetchCursor(_:keys:) returns a non-optional cursor.
2017-08-18 16:48:06 +02:00
Gwendal Roué
06a6c982aa
SE-0148
2017-08-18 14:22:14 +02:00
Gwendal Roué
44d31ead76
Implement deleteAll(_:keys:), deleteOne(_🔑 ) on top of the Query Interface
2017-07-21 11:19:24 +02:00
Gwendal Roué
a913aba018
Replace persistentDictionary with encode(to:)
2017-06-20 07:54:19 +02:00
Gwendal Roué
10e669423f
Use the dbValue identifier for variables of type DatabaseValue
2017-06-01 08:35:14 +02:00
Gwendal Roué
55e4abd534
Rename USING_SQLCIPHER to GRDBCIPHER and USING_CUSTOMSQLITE to GRDBCUSTOMSQLITE
2017-05-22 19:15:10 +02:00
Gwendal Roué
a475cfa340
Tests organization
2017-04-23 16:37:59 +02:00