Thursday, July 28, 2016 [Tweets] [Favorites]

GRDB Swift SQLite ORM

Gwendal Roué:

GRDB.swift is a Swift application toolkit that provides access to SQLite databases.

[…]

GRDB is protocol-oriented, and fetching methods are proper to the RowConvertible protocol.

[…]

This makes GRDB quite unlike other Swift ORMs that use class inheritance and make heavy use of objects mutability, like Realm and Core Data. Both of them provide uniquing and auto-updating records.

Update (2017-05-03): Gwendal Roué:

SQLite provides Data Change Notification Callbacks, and Compile-Time Authorization Callbacks. The first notify of modified rows, when the latter tell which tables and columns are involved in an SQL statement.

When you combine them, you are able to tell if an SQL statement has the opportunity to affect the results of another query. This is the recipe for database observation through RxGRDB (a reactive extension for GRDB over RxSwift), or FetchedRecordsController (a Swift version of Core Data’s NSFetchedResultsController).

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment