mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-10 10:39:30 +00:00
17 lines
454 B
Swift
17 lines
454 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import GRDB
|
|
import Mastodon
|
|
|
|
protocol ContentDatabaseRecord: Codable, FetchableRecord, PersistableRecord {}
|
|
|
|
extension ContentDatabaseRecord {
|
|
public static func databaseJSONDecoder(for column: String) -> JSONDecoder {
|
|
MastodonDecoder()
|
|
}
|
|
|
|
public static func databaseJSONEncoder(for column: String) -> JSONEncoder {
|
|
ContentDatabaseJSONEncoder()
|
|
}
|
|
}
|