A type-safe Core Data query language for Swift and Objective-C that simplifies database operations.
QueryKit is a Swift and Objective-C library that provides a type-safe query language for Core Data. It allows developers to construct database queries using Swift's expressive syntax and KeyPaths, making Core Data interactions more intuitive and less error-prone by replacing traditional string-based predicates.
iOS and macOS developers working with Core Data who want to write safer, more maintainable queries using Swift's type system and modern language features.
Developers choose QueryKit over raw Core Data or string-based predicates because it offers compile-time type checking via Swift KeyPaths, reducing runtime errors and boilerplate code, while providing a fluent, chainable API for building complex queries.
A simple CoreData query language for Swift and Objective-C.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Swift KeyPaths to build queries, ensuring property names and types are checked at compile time, which prevents runtime errors common with string-based predicates as highlighted in the README.
Supports chaining multiple filter and exclude operations, allowing developers to construct complex queries in a readable, modular way, as demonstrated in the README examples.
QuerySets are lazily evaluated, delaying database execution until results are needed, which can improve performance by avoiding unnecessary fetches, as noted in the documentation.
Extends KeyPaths with operators like ==, <<, and logical operators (&&, ||, !), enabling complex conditions without manually building NSPredicates, as detailed in the operators section.
While it supports Objective-C, the type-safe features depend on Swift KeyPaths, making it less intuitive for pure Objective-C projects, and the README admits fallback to NSPredicate for complex cases.
Adds an extra layer over Core Data, which might introduce minor performance overhead and obscure direct access to low-level Core Data APIs for advanced optimizations.
As a niche library focused on Core Data, it has fewer community resources, slower updates, and less integration with modern frameworks like SwiftUI or Combine compared to Apple-native solutions.