mirror of
https://github.com/zhigang1992/MagicalRecord.git
synced 2026-01-12 17:32:18 +08:00
Merge branch 'master' of github.com:magicalpanda/MagicalRecord
This commit is contained in:
19
MagicalRecord.podspec
Normal file
19
MagicalRecord.podspec
Normal file
@@ -0,0 +1,19 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'MagicalRecord'
|
||||
s.version = '1.7.1'
|
||||
s.license = 'MIT'
|
||||
s.summary = 'Super Awesome Easy Fetching for Core Data 1!!!11!!!!1! '
|
||||
s.homepage = 'http://github.com/magicalpanda/MagicalRecord'
|
||||
s.author = { 'Saul Mora' => 'saul@magicalpanda.com' }
|
||||
s.source = { :git => 'http://github.com/magicalpanda/MagicalRecord.git', :tag => '1.7.1' }
|
||||
s.description = 'Handy fetching, threading and data import helpers to make Core Data a little easier to use.'
|
||||
s.source_files = 'Source/**/*.{h,m}'
|
||||
s.framework = 'CoreData'
|
||||
|
||||
def s.post_install(target)
|
||||
prefix_header = config.project_pods_root + target.prefix_header_filename
|
||||
prefix_header.open('a') do |file|
|
||||
file.puts(%{#ifdef __OBJC__\n#define MR_SHORTHAND 1\n#import "CoreData+MagicalRecord.h"\n#endif})
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -418,7 +418,7 @@ static NSUInteger defaultBatchSize = kMagicalRecordDefaultBatchSize;
|
||||
groupedBy:group
|
||||
inContext:context];
|
||||
|
||||
[self performFetch:controller];
|
||||
[self MR_performFetch:controller];
|
||||
return controller;
|
||||
}
|
||||
|
||||
@@ -747,16 +747,16 @@ static NSUInteger defaultBatchSize = kMagicalRecordDefaultBatchSize;
|
||||
[ed setExpression:ex];
|
||||
|
||||
// determine the type of attribute, required to set the expression return type
|
||||
NSAttributeDescription *attributeDescription = [[[self entityDescription] attributesByName] objectForKey:attributeName];
|
||||
NSAttributeDescription *attributeDescription = [[[self MR_entityDescription] attributesByName] objectForKey:attributeName];
|
||||
[ed setExpressionResultType:[attributeDescription attributeType]];
|
||||
NSArray *properties = [NSArray arrayWithObject:ed];
|
||||
MR_RELEASE(ed);
|
||||
|
||||
NSFetchRequest *request = [self requestAllWithPredicate:predicate inContext:context];
|
||||
NSFetchRequest *request = [self MR_requestAllWithPredicate:predicate inContext:context];
|
||||
[request setPropertiesToFetch:properties];
|
||||
[request setResultType:NSDictionaryResultType];
|
||||
|
||||
NSDictionary *resultsDictionary = [self executeFetchRequestAndReturnFirstObject:request];
|
||||
NSDictionary *resultsDictionary = [self MR_executeFetchRequestAndReturnFirstObject:request];
|
||||
NSNumber *resultValue = [resultsDictionary objectForKey:@"result"];
|
||||
|
||||
return resultValue;
|
||||
@@ -767,7 +767,7 @@ static NSUInteger defaultBatchSize = kMagicalRecordDefaultBatchSize;
|
||||
return [self aggregateOperation:function
|
||||
onAttribute:attributeName
|
||||
withPredicate:predicate
|
||||
inContext:[NSManagedObjectContext defaultContext]];
|
||||
inContext:[NSManagedObjectContext MR_defaultContext]];
|
||||
}
|
||||
|
||||
- (id) MR_inContext:(NSManagedObjectContext *)otherContext
|
||||
|
||||
Reference in New Issue
Block a user