Skip to content

0.5.1

Choose a tag to compare

@spnkr spnkr released this 25 Jan 22:04
· 16 commits to main since this release
da1886c

What's Changed

  • Added ability to delete only some items: Country.destroyAll(matching: withSpanishLanguage)
  • destroyAll(...) no longer automatically saves the context
  • Tests for destroyAll and countFor(...)

Details on destroyAll(...):

Removes all objects from Core Data.
Deletes them from the context.

Drawing.destroyAll(context: viewContext)

You can also specify a predicate to only delete some items:

let withSpanishLanguage = Predicate("languages contains %@", es)
Country.destroyAll(matching: withSpanishLanguage)

Remember to save the context after deleting objects.

Full Changelog: 0.5.0...0.5.1