forked from magicalpanda/MagicalRecord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ActiveRecordHelpers.h
43 lines (29 loc) · 1.08 KB
/
ActiveRecordHelpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// ActiveRecordHelpers.h
//
// Created by Saul Mora on 3/11/10.
// Copyright 2010 Magical Panda Software, LLC All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#ifdef NS_BLOCKS_AVAILABLE
@class NSManagedObjectContext;
typedef void (^CoreDataBlock)(NSManagedObjectContext *);
#endif
@interface ActiveRecordHelpers : NSObject {
}
+ (void) cleanUp;
+ (void) handleErrors:(NSError *)error;
- (void) handleErrors:(NSError *)error;
+ (void) setupCoreDataStack;
+ (void) setupCoreDataStackWithInMemoryStore;
+ (void) setupAutoMigratingCoreDataStack;
+ (void) setupCoreDataStackWithStoreNamed:(NSString *)storeName;
+ (void) setupCoreDataStackWithAutoMigratingSqliteStoreNamed:(NSString *)storeName;
#ifdef NS_BLOCKS_AVAILABLE
+ (void) performSaveDataOperationWithBlock:(CoreDataBlock)block;
+ (void) performSaveDataOperationInBackgroundWithBlock:(CoreDataBlock)block;
+ (void) performLookupOperationWithBlock:(CoreDataBlock)block;
+ (void) performSaveDataOperationInBackgroundWithBlock:(CoreDataBlock)block completion:(void(^)(void))callback;
#endif
@end