mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-16 03:11:59 +01:00
35 lines
622 B
Swift
35 lines
622 B
Swift
//
|
|
// 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()
|
|
|
|
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
|
|
}
|
|
}
|
|
|