Changelog History
Page 18
-
v0.75.1 Changes
๐ Released July 8, 2016
๐ Fixed
- ๐ Fixed a crash that would happen when performing a full text search in a DatabasePool (fixes #80)
-
v0.75.0 Changes
๐ Released July 8, 2016
๐ฅ Breaking change
๐ Row adapters have been refactored (documentation).
// Row "variants" have been renamed row "scopes": struct Row { - func variant(named name: String) -> Row? + func scoped(on name: String) -> Row? } // Scope definition: VariantRowAdapter has been renamed ScopeAdapter: -struct VariantRowAdapter : RowAdapter { - init(variants: [String: RowAdapter]) -} +struct ScopeAdapter : RowAdapter { + init(_ scopes: [String: RowAdapter]) +} // Adding scopes to an existing adapter: extension RowAdapter { - func adapterWithVariants(variants: [String: RowAdapter]) -> RowAdapter + func addingScopes(scopes: [String: RowAdapter]) -> RowAdapter } // Implementing custom adapters protocol ConcreteRowAdapter { - var variants: [String: ConcreteRowAdapter] { get } + var scopes: [String: ConcreteRowAdapter] { get } }
-
v0.74.0 Changes
๐ Released July 6, 2016
๐ New
๐ TableMapping protocol lets you delete rows identified by their primary keys, or any columns involved in a unique index (closes #56, documentation):
try Person.deleteOne(db, key: 1) try Person.deleteOne(db, key: ["email": "[email protected]"]) try Citizenship.deleteOne(db, key: ["personID": 1, "countryCode": "FR"]) try Country.deleteAll(db, keys: ["FR", "US"])
๐ฅ Breaking change
The
fetch(_:keys:)
,fetchAll(_:keys:)
andfetchOne(_:key:)
methods used to accept any dictionary of column/value pairs to identify rows. Now these methods raise a fatal error if the columns are not guaranteed, at the database level, to uniquely identify rows: columns must be the primary key, or involved in a unique index:// CREATE TABLE persons ( // id INTEGER PRIMARY KEY, -- can fetch and delete by id // email TEXT UNIQUE, -- can fetch and delete by email // name TEXT -- nope // ) Person.fetchOne(db, key: ["id": 1]) // Person? Person.fetchOne(db, key: ["email": "[email protected]"]) // Person? Person.fetchOne(db, key: ["name": "Arthur"]) // fatal error: table persons has no unique index on column name.
This change harmonizes the behavior of those fetching methods with the new
deleteOne(_:key:)
anddeleteAll(_:keys:)
.
-
v0.73.0 Changes
๐ Released June 20, 2016
๐ Improved
- FetchedRecordsController doesn't check for changes when a database transaction modifies columns that are not present in the request it tracks.
๐ New
๐ The query interface lets you provide arguments to your sql snippets (documentation):
let wines = Wine.filter(sql: "origin = ?", arguments: ["Burgundy"]).fetchAll(db)
๐ Transaction observers can efficiently filter the database changes they are interested in (documentation).
๐ Support for NSUUID (documentation)
-
v0.72.0 Changes
๐ Released June 9, 2016
๐ Improved
- NSDecimalNumber used to store as a double in the database, for all values. Now decimal numbers that contain integers fitting Int64 attempt to store integers in the database.
๐ฅ Breaking Changes
- ๐ Row adapters have been refactored (documentation).
-
v0.71.0 Changes
๐ Released June 5, 2016
๐ Fixed
- ๐ Fix a crash that would sometimes happen when a FetchedRecordsController's callbacks avoid retain cycles by capturing unowned references.
- ๐ Improved handling of numeric overflows. Fixes #68.
๐ New
- ๐ GRDB can now use a custom SQLite build (documentation). Merged #62 by @swiftlyfalling.
- ๐ With a custom SQLite build, transaction observers can observe individual column values in the rows modified by a transaction (documentation). Merged #63 by @swiftlyfalling.
- ๐ FetchedRecordsController can now fetch other values alongside the fetched records. This grants you the ability to fetch values that are consistent with the notified changes. (documentation)
๐ฅ Breaking Changes
- ๐ iOS7 is no longer supported.
-
v0.70.1 Changes
๐ Released May 30, 2016
๐ Fixed
- โก๏ธ
Database.cachedUpdateStatement(sql)
no longer returns a statement that can not be reused because it has already failed.
- โก๏ธ
-
v0.70.0 Changes
๐ Released May 28, 2016
๐ New
- ๐
Database.inSavepoint()
allows fine-grained committing and rollbacking of database statements (documentation). Closes #61.
- ๐
-
v0.69.0 Changes
๐ Released May 28, 2016
๐ Fixed
- ๐ Database changes that are on hold because of a savepoint are only notified to transaction observers after the savepoint has been released. In previous versions of GRDB, savepoints had the opportunity to rollback a subset of database events, and mislead transaction observers about the actual content of a transaction. Related issue: #61.
๐ New
- ๐
DatabaseEvent.copy()
lets you store a database event notified to a transaction observer (documentation).
-
v0.68.0 Changes
๐ Released May 28, 2016
๐ New
๐ This release provides tools for your custom persistence mechanisms that don't use the built-in Persistable protocol, and addresses issue #60.
- ๐
Database.primaryKey(tableName)
lets you introspect a table's primary key (documentation). - ๐
Database.cachedSelectStatement(sql)
andDatabase.cachedUpdateStatement(sql)
provide robust caching of prepared statements (documentation)
- ๐