Realm v0.6.0 Release Notes

Release Date: 2014-04-11 // over 8 years ago
  • API breaking changes

    • contextWithPersistenceToFile:error: renamed to contextPersistedAtPath:error: in TDBContext
    • readWithBlock: renamed to readUsingBlock: in TDBContext
    • writeWithBlock:error: renamed to writeUsingBlock:error: in TDBContext
    • readTable:withBlock: renamed to readTable:usingBlock: in TDBContext
    • writeTable:withBlock:error: renamed to writeTable:usingBlock:error: in TDBContext
    • findFirstRow renamed to indexOfFirstMatchingRow on TDBQuery.
    • findFirstRowFromIndex: renamed to indexOfFirstMatchingRowFromIndex: on TDBQuery.
    • Return NSNotFound instead of -1 when appropriate.
    • ๐Ÿ“‡ Renamed castClass to castToTytpedTableClass on TDBTable.
    • ๐Ÿšš removeAllRows, removeRowAtIndex, removeLastRow, addRow and insertRow methods on table now return void instead of BOOL.

    โœจ Enhancements

    • A TDBTable can now be queried using where: and where:orderBy: taking NSPredicate and NSSortDescriptor as arguments.
    • โž• Added find: method on TDBTable to find first row matching predicate.
    • 0๏ธโƒฃ contextWithDefaultPersistence class method added to TDBContext. Will create a context persisted to a file in app/documents folder.
    • renameColumnWithIndex:to: has been added to TDBTable.
    • distinctValuesInColumnWithIndex has been added to TDBTable.
    • dateIsBetween::, doubleIsBetween::, floatIsBetween:: and intIsBetween:: have been added to TDBQuery.
    • Column names in Typed Tables can begin with non-capital letters too. The generated addX selector can look odd. For example, a table with one column with name age, appending a new row will look like [table addage:7].
    • ๐Ÿ‘ Mixed typed values are better validated when rows are added, inserted, or modified as object literals.
    • โšก๏ธ addRow, insertRow, and row updates can be done using objects derived from NSObject.
    • where has been added to TDBViewand TDBViewProtocol.
    • โž• Adding support for "smart" contexts (TDBSmartContext).

    ๐Ÿ›  Bugfixes

    • ๐Ÿ‘ป Modifications of a TDBView and TDBQuery now throw an exception in a readtransaction.