mirror of
https://github.com/metabolist/metatext.git
synced 2024-05-14 22:43:05 +00:00
17 lines
461 B
Swift
17 lines
461 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import GRDB
|
|
|
|
struct AccountResult: Codable, Hashable, FetchableRecord {
|
|
let account: AccountRecord
|
|
let moved: AccountRecord?
|
|
}
|
|
|
|
extension QueryInterfaceRequest where RowDecoder == AccountRecord {
|
|
var accountResultRequest: AnyFetchRequest<AccountResult> {
|
|
AnyFetchRequest(including(optional: AccountRecord.moved))
|
|
.asRequest(of: AccountResult.self)
|
|
}
|
|
}
|