mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-27 01:52:30 +01:00
35 lines
618 B
Swift
35 lines
618 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 Data
|
|
|
|
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
|
|
}
|
|
}
|
|
|