Get Updates By E-mail 

Article Written By:
Johann Dowa

Kuery – A Swift 4 Library For Better Core Data Queries Using Smart Keypaths

  • 15
  •  
  •  
  •  
  •  

Kuery is an open source Swift library for Core Data from Kishikawa Katsumi that utilizes Swift 4’s Smart Keypaths.

With Kuery you have type safety, and code completion for your queries unlike when using NSPredicate directly.

These snippets from the readme show a couple of simple queries using NSPredicate:

NSPredicate(format: "name == %@", "Katsumi")
NSPredicate(format: "age > %@", 20)

These are the same queries with Kuery:

Query(Person.self).filter(\Person.name == "Katsumi")
Query(Person.self).filter(\Person.age > 20)

You can find Kuery on Github here.

A nice way to perform Core Data queries.


  • 15
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments