mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
Deprecate TableMapping.primaryKeyRowComparator
This commit is contained in:
1 parent
1ee8c73562
commit
d12dad2e34
2 files changed
+5
No files matched your search
@@ -249,6 +249,9 @@ extension TableMapping {
|
||||
/// }
|
||||
///
|
||||
/// - throws: A DatabaseError if table does not exist.
|
||||
/// - attention: This method is deprecated. It will be removed is the next
|
||||
/// major version of the library, without any replacement.
|
||||
@available(*, deprecated)
|
||||
public static func primaryKeyRowComparator(_ db: Database) throws -> (Row, Row) -> Bool {
|
||||
let primaryKey = try rowPrimaryKey(db)
|
||||
return { (lhs, rhs) in
|
||||
|
||||
@@ -9,6 +9,7 @@ import XCTest
|
||||
|
||||
class TableMappingTests: GRDBTestCase {
|
||||
|
||||
// Test deprecated method primaryKeyRowComparator
|
||||
func testPrimaryKeyRowComparatorWithIntegerPrimaryKey() throws {
|
||||
struct Person : TableMapping {
|
||||
static let databaseTableName = "persons"
|
||||
@@ -32,6 +33,7 @@ class TableMappingTests: GRDBTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
// Test deprecated method primaryKeyRowComparator
|
||||
func testPrimaryKeyRowComparatorWithHiddenRowIDPrimaryKey() throws {
|
||||
struct Person : TableMapping {
|
||||
static let databaseTableName = "persons"
|
||||
|
||||
Reference in new issue
Block a user