Skip to content

Commit 860f4f4

Browse files
Merge pull request #28 from mandel-macaque/bug-34968
[Fix] Add missing CoreData selectors.
2 parents dd06fbb + 3a2f435 commit 860f4f4

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

src/coredata.cs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ public enum NSPersistentStoreUbiquitousTransitionType : nuint_compat_int {
2222
InitialImportCompleted
2323
}
2424

25+
[Native]
26+
public enum NSSnapshotEventType : nuint_compat_int {
27+
UndoInsertion = 1 << 1,
28+
UndoDeletion = 1 << 2,
29+
UndoUpdate = 1 << 3,
30+
Rollback = 1 << 4,
31+
Refresh = 1 << 5,
32+
MergePolicy = 1 << 6
33+
}
34+
2535
[BaseType (typeof (NSPersistentStore))]
2636
// Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: NSMappedObjectStore must be initialized with initWithPersistentStoreCoordinator:configurationName:URL:options
2737
[DisableDefaultCtor]
@@ -127,6 +137,9 @@ public interface NSEntityDescription : NSCoding, NSCopying {
127137
[Export ("managedObjectClassName")]
128138
string ManagedObjectClassName { get; set; }
129139

140+
[Export ("renamingIdentifier")]
141+
string RenamingIdentifier { get; set; }
142+
130143
[NullAllowed] // by default this property is null
131144
[Export ("name")]
132145
string Name { get; set; }
@@ -252,6 +265,16 @@ public interface NSEntityMigrationPolicy {
252265
bool EndEntityMapping (NSEntityMapping mapping, NSMigrationManager manager, out NSError error);
253266
}
254267

268+
[BaseType (typeof (NSPropertyDescription))]
269+
public interface NSExpressionDescription {
270+
271+
[Export ("expression")]
272+
NSExpression Expression { get; set; }
273+
274+
[Export ("expressionResultType")]
275+
NSAttributeType ResultType { get; set; }
276+
}
277+
255278
[BaseType (typeof (NSPropertyDescription))]
256279
public interface NSFetchedPropertyDescription {
257280

@@ -260,6 +283,28 @@ public interface NSFetchedPropertyDescription {
260283
NSFetchRequest FetchRequest { get; set; }
261284
}
262285

286+
[DisableDefaultCtor]
287+
[BaseType (typeof (NSExpression))]
288+
public interface NSFetchRequestExpression {
289+
290+
[Internal]
291+
[DesignatedInitializer]
292+
[Export ("initWithExpressionType:")]
293+
IntPtr Constructor (NSExpressionType type);
294+
295+
[Static, Export ("expressionForFetch:context:countOnly:")]
296+
NSFetchRequestExpression FromFetch (NSExpression fetch, NSExpression context, bool countOnly);
297+
298+
[Export ("requestExpression")]
299+
NSExpression Request { get; }
300+
301+
[Export ("contextExpression")]
302+
NSExpression Context { get; }
303+
304+
[Export ("countOnlyRequest")]
305+
bool IsCountOnly { [Bind ("isCountOnlyRequest")] get;}
306+
}
307+
263308
[BaseType (typeof (NSPersistentStoreRequest))]
264309
public interface NSFetchRequest : NSCoding {
265310

@@ -548,6 +593,9 @@ public interface NSManagedObject {
548593
[Export ("isFault")]
549594
bool IsFault { get; }
550595

596+
[Export ("faultingState")]
597+
nuint FaultingState { get; }
598+
551599
[Export ("hasFaultForRelationshipNamed:")]
552600
bool HasFaultForRelationshipNamed (string key);
553601

@@ -926,6 +974,9 @@ public interface NSMappingModel {
926974
[Static, Export ("mappingModelFromBundles:forSourceModel:destinationModel:")]
927975
NSMappingModel MappingModelFromBundles (NSBundle[] bundles, NSManagedObjectModel sourceModel, NSManagedObjectModel destinationModel);
928976

977+
[Static, Export ("inferredMappingModelForSourceModel:destinationModel:error:")]
978+
NSMappingModel GetInferredMappingModel (NSManagedObjectModel source, NSManagedObjectModel destination, out NSError error);
979+
929980
[Export ("initWithContentsOfURL:")]
930981
IntPtr Constructor (NSUrl url);
931982

@@ -1451,6 +1502,9 @@ public interface NSPropertyDescription : NSCoding, NSCopying {
14511502
[Export ("versionHashModifier")]
14521503
string VersionHashModifier { get; set; }
14531504

1505+
[Export ("renamingIdentifier")]
1506+
string RenamingIdentifier { get; set; }
1507+
14541508
// 5.0
14551509
[Since (5,0)]
14561510
[Export ("indexedBySpotlight")]

0 commit comments

Comments
 (0)