YapDatabaseExtensions v1.7.0 Release Notes

  • ๐Ÿ‘€ 1. [YDB-25]: Adds YapDB.Search to aid with running FTS queries. An example of using with will be forthcoming (probably after Swift 2.0 has settled). But essentially, you can initialize it with your db, an array of YapDB.Fetch values (which should be views) and a string mapper. Then execute usingTerm(term: String) with the search term supplied by the user to run the search. ๐Ÿ‘€ 2. [YDB-26]: Adds some missing default parameters for the YapDB.SecondaryIndex wrapper. ๐Ÿ‘€ 3. [YDB-27]: Removes an explicit unwrap which could cause a crash if pattern matching against value types. ๐Ÿ‘€ 4. [YDB-29]: Adds support to YapDatabaseConnection for writeBlockOperation (NSBlockOperation), write and remove APIs. This is great if you want to perform a number of writes of different types in the same transaction inside of an NSOperation based architecture, as you can do:

    queue.addOperation(connection.writeBlockOperation { transaction in 
        transaction.write(foo)
        transaction.write(bar)
        transaction.remove(bat)
    })
    

    If you're using my Operations framework, as these operations are NSBlockOperations, use ComposedOperation to attach conditions or observers. E.g.

    let write = ComposedOperation(connection.writeBlockOperation { transaction in 
        transaction.write(foo)
        transaction.write(bar)
        transaction.remove(bat)
    })
    write.addCondition(UserConfirmationCondition()) // etc etc
    queue.addOperation(write)
    

    ๐Ÿ‘€ 5. [YDB-30]: Expands the YapDB.Mappings type to support the full YapDatabaseViewMappings gamut. ๐Ÿ‘€ 6. [YDB-31]: Silences a warning in the removeAtIndexes API.