mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-28 02:20:54 +01:00
33 lines
625 B
Swift
33 lines
625 B
Swift
//
|
|
// AttachmentsTable.swift
|
|
// NetNewsWire
|
|
//
|
|
// 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()
|
|
|
|
init(name: String) {
|
|
self.name = name
|
|
}
|
|
|
|
// MARK: - DatabaseRelatedObjectsTable
|
|
|
|
func objectWithRow(_ row: FMResultSet) -> DatabaseObject? {
|
|
if let attachment = Attachment(row: row) {
|
|
return attachment as DatabaseObject
|
|
}
|
|
return nil
|
|
}
|
|
}
|
|
|