This commit is contained in:
Gwendal Roué committed 2021-03-28 10:12:55 +02:00
1 parent f1cd6dbae8
commit bd29585461
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -121,7 +121,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
- **New**: Added support for the `EXISTS` and `NOT EXISTS` subquery operators. See the updated [SQL Operators](README.md#sql-operators) documentation.
- **New**: `Foundation.Decimal` can now be stored in the database, and all Foundation number types can be decoded from database strings. See the [NSNumber, NSDecimalNumber, and Decimal](README.md#nsnumber-nsdecimalnumber-and-decimal) chapter for details.
- **New**: `Foundation.Decimal` can now be stored in the database, and all Foundation number types can be decoded from decimal numbers stored as strings. See the [NSNumber, NSDecimalNumber, and Decimal](README.md#nsnumber-nsdecimalnumber-and-decimal) chapter for details.
## 5.6.0
+2 -2
View File
@@ -1433,10 +1433,10 @@ Here is how GRDB supports the various data types supported by SQLite:
let number = try Decimal.fetchOne(db, sql: "SELECT -100") // Decimal
```
- All three types can decode database strings containing decimal numbers:
- All three types decode database strings as decimal numbers:
```swift
let number = try NSNumber.fetchOne(db, sql: "SELECT '10'") // NSDecimalNumber
let number = try NSNumber.fetchOne(db, sql: "SELECT '10'") // NSDecimalNumber (sic)
let number = try NSDecimalNumber.fetchOne(db, sql: "SELECT '1.23'") // NSDecimalNumber
let number = try Decimal.fetchOne(db, sql: "SELECT '-100'") // Decimal
```