NetNewsWire/Frameworks/ArticlesDatabase/AttachmentsTable.swift

35 lines
622 B
Swift
Raw Normal View History

//
2017-07-17 05:51:08 +02:00
// AttachmentsTable.swift
// Database
//
// Created by Brent Simmons on 7/15/17.
// Copyright © 2017 Ranchero Software. All rights reserved.
//
import Foundation
import RSDatabase
import Articles
final class AttachmentsTable: DatabaseRelatedObjectsTable {
let name: String
let databaseIDKey = DatabaseKey.attachmentID
var cache = DatabaseObjectCache()
2017-07-29 21:13:38 +02:00
2017-08-21 00:56:58 +02:00
init(name: String) {
self.name = name
}
2017-07-17 05:51:08 +02:00
// MARK: DatabaseRelatedObjectsTable
func objectWithRow(_ row: FMResultSet) -> DatabaseObject? {
if let attachment = Attachment(row: row) {
return attachment as DatabaseObject
}
return nil
}
}