mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
Cleanup
This commit is contained in:
1 parent
ae6a224122
commit
fe0198f453
3 files changed
+13
-22
No files matched your search
@@ -117,7 +117,7 @@ class AssociationBelongsToRowScopeTests: GRDBTestCase {
|
||||
}
|
||||
|
||||
func testCustomPluralScopeIncludingRequired() throws {
|
||||
// Make sure plural keys are preserved
|
||||
// Make sure explicit plural keys are preserved
|
||||
let dbQueue = try makeDatabaseQueue()
|
||||
do {
|
||||
let request = Player.including(required: Player.belongsTo(Team.self, key: "teams"))
|
||||
@@ -138,7 +138,7 @@ class AssociationBelongsToRowScopeTests: GRDBTestCase {
|
||||
}
|
||||
|
||||
func testCustomPluralScopeIncludingOptional() throws {
|
||||
// Make sure plural keys are preserved
|
||||
// Make sure explicit plural keys are preserved
|
||||
let dbQueue = try makeDatabaseQueue()
|
||||
do {
|
||||
let request = Player.including(optional: Player.belongsTo(Team.self, key: "teams"))
|
||||
|
||||
@@ -111,8 +111,7 @@ class AssociationPrefetchingFetchableRecordTests: GRDBTestCase {
|
||||
let request = A
|
||||
.including(all: A
|
||||
.hasMany(B.self)
|
||||
.orderByPrimaryKey()
|
||||
.forKey("bs")) // TODO: auto-pluralization
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey()
|
||||
|
||||
// Array
|
||||
@@ -294,10 +293,8 @@ class AssociationPrefetchingFetchableRecordTests: GRDBTestCase {
|
||||
.hasMany(C.self)
|
||||
.including(all: C
|
||||
.hasMany(D.self)
|
||||
.orderByPrimaryKey()
|
||||
.forKey("ds")) // TODO: auto-pluralization
|
||||
.orderByPrimaryKey()
|
||||
.forKey("cs")) // TODO: auto-pluralization
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey()
|
||||
|
||||
struct Record: FetchableRecord, Equatable {
|
||||
@@ -385,8 +382,7 @@ class AssociationPrefetchingFetchableRecordTests: GRDBTestCase {
|
||||
.including(all: C
|
||||
.hasMany(D.self)
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey()
|
||||
.forKey("cs")) // TODO: auto-pluralization
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey()
|
||||
|
||||
struct Record: FetchableRecord, Equatable {
|
||||
@@ -584,8 +580,7 @@ class AssociationPrefetchingFetchableRecordTests: GRDBTestCase {
|
||||
.including(required: C
|
||||
.hasMany(D.self)
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey()
|
||||
.forKey("cs")) // TODO: auto-pluralization
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey()
|
||||
|
||||
struct Record: FetchableRecord, Equatable {
|
||||
@@ -667,8 +662,7 @@ class AssociationPrefetchingFetchableRecordTests: GRDBTestCase {
|
||||
.including(required: C
|
||||
.hasMany(D.self)
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey()
|
||||
.forKey("cs")) // TODO: auto-pluralization
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey()
|
||||
|
||||
struct Record: FetchableRecord, Equatable {
|
||||
@@ -849,8 +843,7 @@ class AssociationPrefetchingFetchableRecordTests: GRDBTestCase {
|
||||
let request = A
|
||||
.including(all: A
|
||||
.hasMany(D.self, through: A.hasMany(C.self), using: C.hasMany(D.self))
|
||||
.orderByPrimaryKey()
|
||||
.forKey("ds")) // TODO: auto-pluralization
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey()
|
||||
|
||||
struct Record: FetchableRecord, Equatable {
|
||||
@@ -985,13 +978,12 @@ class AssociationPrefetchingFetchableRecordTests: GRDBTestCase {
|
||||
try dbQueue.read { db in
|
||||
// Plain request
|
||||
do {
|
||||
let cs = A.hasMany(C.self).forKey("cs")
|
||||
let cs = A.hasMany(C.self)
|
||||
let request = A
|
||||
.including(all: cs.orderByPrimaryKey())
|
||||
.including(all: A
|
||||
.hasMany(D.self, through: cs, using: C.hasMany(D.self))
|
||||
.orderByPrimaryKey()
|
||||
.forKey("ds")) // TODO: auto-pluralization
|
||||
.orderByPrimaryKey())
|
||||
.orderByPrimaryKey()
|
||||
|
||||
struct Record: FetchableRecord, Equatable {
|
||||
@@ -1163,8 +1155,7 @@ class AssociationPrefetchingFetchableRecordTests: GRDBTestCase {
|
||||
.belongsTo(A.self)
|
||||
.including(all: A
|
||||
.hasMany(C.self)
|
||||
.orderByPrimaryKey()
|
||||
.forKey("cs")) // TODO: auto-pluralization
|
||||
.orderByPrimaryKey())
|
||||
)
|
||||
.orderByPrimaryKey()
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ class AssociationPrefetchingObservationTests: GRDBTestCase {
|
||||
try dbQueue.read { db in
|
||||
// Plain request
|
||||
do {
|
||||
let cs = A.hasMany(C.self).forKey("cs")
|
||||
let cs = A.hasMany(C.self)
|
||||
let request = A
|
||||
.including(all: cs)
|
||||
.including(all: A
|
||||
|
||||
Reference in new issue
Block a user