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 ofYapDB.Fetch
values (which should be views) and a string mapper. Then executeusingTerm(term: String)
with the search term supplied by the user to run the search. ๐ 2. [YDB-26]: Adds some missing default parameters for theYapDB.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 toYapDatabaseConnection
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 anNSOperation
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 areNSBlockOperation
s, useComposedOperation
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 fullYapDatabaseViewMappings
gamut. ๐ 6. [YDB-31]: Silences a warning in theremoveAtIndexes
API.