2017-08-21 00:56:58 +02:00
|
|
|
//
|
|
|
|
// String+Database.swift
|
|
|
|
// Database
|
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 8/20/17.
|
|
|
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import RSDatabase
|
|
|
|
|
|
|
|
// A tag is a String.
|
|
|
|
// Extending tag to conform to DatabaseObject means extending String to conform to DatabaseObject.
|
|
|
|
|
|
|
|
extension String: DatabaseObject {
|
|
|
|
|
2017-09-14 02:40:25 +02:00
|
|
|
public func databaseDictionary() -> NSDictionary? {
|
|
|
|
|
|
|
|
preconditionFailure("databaseDictionary() called for a tag: this should never happen.")
|
|
|
|
}
|
|
|
|
|
2017-08-21 07:43:46 +02:00
|
|
|
public var databaseID: String {
|
2017-08-21 00:56:58 +02:00
|
|
|
get {
|
|
|
|
return self
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-05 02:10:02 +02:00
|
|
|
|
|
|
|
|