MagicalRecord README

The project's README from github.com/magicalpanda/MagicalRecord. As one markdown file: README.md.

Awesome MagicalRecord

Circle CI

In software engineering, the active record pattern is a design pattern found in software that stores its data in relational databases. It was named by Martin Fowler in his book Patterns of Enterprise Application Architecture. The interface to such an object would include functions such as Insert, Update, and Delete, plus properties that correspond more-or-less directly to the columns in the underlying database table.

Active record is an approach to accessing data in a database. A database table or view is wrapped into a class; thus an object instance is tied to a single row in the table. After creation of an object, a new row is added to the table upon save. Any object loaded gets its information from the database; when an object is updated, the corresponding row in the table is also updated. The wrapper class implements accessor methods or properties for each column in the table or view.

- Wikipedia

MagicalRecord was inspired by the ease of Ruby on Rails' Active Record fetching. The goals of this code are:

Status of the project

This project's activity has stopped, superseded by Core Data itself. Our latest versions available are:

Documentation

Support

This project's activity has stopped. MagicalRecord is provided as-is, free of charge. For support, you have a few choices:

MagicalRecord (magicalpanda/MagicalRecord)

Searching Database…

What is this?MagicalRecord is an Objective-C library that simplifies Core Data usage on iOS and macOS, giving you clean one-line fetches, saves, and entity creation instead of verbose NSFetchRequest boilerplate.
Is it a framework I build my app around, or just a set of helper methods on top of Core Data?It's a lightweight library of category methods and helpers that sit on top of Apple's existing Core Data stack, following the Active Record pattern popularized by Ruby on Rails.
How do I add it to a project?Install it via CocoaPods using the pod 'MagicalRecord' line, pointing at a specific tag like 2.4.0 or one of the 3.0 branches if you want the experimental version.
Do I need Core Data set up already, or does this replace it?You still use Apple's Core Data framework underneath; MagicalRecord just wraps the managed object context, fetching, saving, and importing calls to make them shorter.
Is this project still maintained?No, development has stopped entirely because Apple's own Core Data improvements made the wrapper less necessary; it's kept as-is with no active support.
Does it work on both iPhone and Mac apps?Yes, it's usable on both iOS and macOS projects since both rely on the same Core Data stack that MagicalRecord wraps.
What operations does MagicalRecord simplify beyond fetching?Besides fetching, it covers creating entities, deleting entities, saving contexts, importing data, and managing managed object contexts, based on its documentation topic list.
Should I use MagicalRecord in a new project today?Probably not for new work; the README explicitly says the project's activity has stopped and was superseded by improvements in Core Data itself, so it's mainly useful for maintaining legacy codebases.
Size
8 MB
Stars
10.7K
Age
16y
Commits · 90 Days