diff --git a/README.md b/README.md index add6eb110..a105809dd 100644 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ Ask for an optional when the value may be NULL: let name: String? = row.value(named: "name") ``` -Pick the type you need. All types that adopt the [DatabaseValueConvertible](#custom-value-types) protocol can be extracted: +The `value` function generally returns the type you ask for: ```swift let bookCount: Int = row.value(named: "bookCount") @@ -313,8 +313,6 @@ let dateString: String = row.value(named: "date") // "2015-09-11 18:14:15. let date: NSDate = row.value(named: "date") // NSDate ``` -Don't miss the [NSData](#nsdata-and-memory-savings) paragraph if you target memory efficiency. - You can also use the `as` type casting operator: ```swift @@ -330,6 +328,8 @@ row.value(...) as Int! > row.value(...) as? Int // NO NO NO DON'T DO THAT! > ``` +See [Values](#values) for more information on supported types. Don't miss [NSData](#nsdata-and-memory-savings) if you target memory efficiency. + #### Rows as Dictionaries