metatext/DB/Sources/DB/Content/ContentDatabaseRecord.swift
Justin Mazzocchi 66e7b01282
Refactoring
2020-10-13 17:28:27 -07:00

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()
}
}