mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
Documentation and cleanup
This commit is contained in:
1 parent
8319c70315
commit
9958e7b96c
4 files changed
+23
-34
No files matched your search
@@ -132,12 +132,11 @@ extension QueryInterfaceQuery {
|
||||
|
||||
func appendingJoin(_ join: AssociationJoin, forKey key: String) -> QueryInterfaceQuery {
|
||||
var query = self
|
||||
if let existingJoin = query.joins[key] {
|
||||
if let existingJoin = query.joins.removeValue(forKey: key) {
|
||||
guard let mergedJoin = existingJoin.merged(with: join) else {
|
||||
// can't merge
|
||||
fatalError("The association key \"\(key)\" is ambiguous. Use the Association.forKey(_:) method is order to disambiguate.")
|
||||
}
|
||||
query.joins.removeValue(forKey: key)
|
||||
query.joins.append(value: mergedJoin, forKey: key)
|
||||
} else {
|
||||
query.joins.append(value: join, forKey: key)
|
||||
|
||||
Reference in new issue
Block a user