mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
RecordBox changelog
This commit is contained in:
1 parent
d96543ddeb
commit
283f08de07
1 file changed
+26
@@ -1,6 +1,32 @@
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
## Next Version
|
||||
|
||||
**New**
|
||||
|
||||
- The RecordBox class brings changes tracking to any record type ([documentation](https://github.com/groue/GRDB.swift/blob/master/README.md#recordbox-class)):
|
||||
|
||||
```swift
|
||||
// A regular record struct
|
||||
struct Player: RowConvertible, MutablePersistable { ... }
|
||||
|
||||
try dbQueue.inDatabase { db in
|
||||
// Fetch a boxed player
|
||||
if let player = try RecordBox<Player>.fetchOne(db, key: 1) {
|
||||
player.value.score = 300
|
||||
|
||||
if player.hasPersistentChangedValues {
|
||||
print("player has been modified")
|
||||
}
|
||||
|
||||
// Does nothing if player has not been modified:
|
||||
try player.updateChanges(db)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## 2.6.1
|
||||
|
||||
Released January 19, 2018 • [diff](https://github.com/groue/GRDB.swift/compare/v2.6.0...v2.6.1)
|
||||
|
||||
Reference in new issue
Block a user