mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Cleanup
This commit is contained in:
1 parent
1195439226
commit
79d6b02a2f
1 file changed
+2
-10
@@ -34,11 +34,7 @@ public protocol _ValueReducer {
|
||||
}
|
||||
|
||||
extension _ValueReducer {
|
||||
func fetch(
|
||||
_ db: Database,
|
||||
requiringWriteAccess: Bool)
|
||||
throws -> Fetched
|
||||
{
|
||||
func fetch(_ db: Database, requiringWriteAccess: Bool) throws -> Fetched {
|
||||
if requiringWriteAccess {
|
||||
var fetchedValue: Fetched?
|
||||
try db.inSavepoint {
|
||||
@@ -53,11 +49,7 @@ extension _ValueReducer {
|
||||
}
|
||||
}
|
||||
|
||||
mutating func fetchAndReduce(
|
||||
_ db: Database,
|
||||
requiringWriteAccess: Bool)
|
||||
throws -> Value?
|
||||
{
|
||||
mutating func fetchAndReduce(_ db: Database, requiringWriteAccess: Bool) throws -> Value? {
|
||||
let fetchedValue = try fetch(db, requiringWriteAccess: requiringWriteAccess)
|
||||
return value(fetchedValue)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user