mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
19 lines
489 B
Swift
19 lines
489 B
Swift
import Foundation
|
|
|
|
extension RowConvertible {
|
|
|
|
/// NSDictionary initializer.
|
|
///
|
|
/// The result is nil unless all keys are strings, and values adopt
|
|
/// DatabaseValueConvertible (NSData, NSDate, NSNull, NSNumber, NSString,
|
|
/// NSURL).
|
|
///
|
|
/// - parameter dictionary: An NSDictionary.
|
|
public init?(dictionary: NSDictionary) {
|
|
guard let row = Row(dictionary: dictionary) else {
|
|
return nil
|
|
}
|
|
self.init(row: row)
|
|
}
|
|
}
|