mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
RowAdapter.addingScopes returns self if the scopes dictionary is empty
This commit is contained in:
1 parent
df79bb8ed8
commit
9f78a758bd
2 files changed
+6
-2
No files matched your search
@@ -237,7 +237,11 @@ extension RowAdapter {
|
||||
/// - parameter scopes: A dictionary that maps scope names to
|
||||
/// row adapters.
|
||||
public func addingScopes(_ scopes: [String: RowAdapter]) -> RowAdapter {
|
||||
return ScopeAdapter(base: self, scopes: scopes)
|
||||
if scopes.isEmpty {
|
||||
return self
|
||||
} else {
|
||||
return ScopeAdapter(base: self, scopes: scopes)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ GRDB 3.0
|
||||
- sync
|
||||
- ?
|
||||
- [ ] filter(rowid:), filter(rowids:)
|
||||
- [ ] If required by associations, make reversed() make nothing when there is no alraedy applied ordering
|
||||
- [ ] hide ScopeAdapter(base, scopes), because base.addingScopes has a better implementation
|
||||
|
||||
Not sure
|
||||
|
||||
|
||||
Reference in new issue
Block a user