Difference between revisions of "Getting Started with CoreData"

From PeformIQ Upgrade
Jump to navigation Jump to search
Line 12: Line 12:
* https://www.oneclickitsolution.com/blog/getting-started-with-core-data-fundamentals/
* https://www.oneclickitsolution.com/blog/getting-started-with-core-data-fundamentals/
*  
*  
=Attribute Types=
* https://developer.apple.com/documentation/coredata/nsattributedescription#//apple_ref/occ/cl/NSAttributeDescription
<pre>
typedef enum {
    NSUndefinedAttributeType = 0,
    NSInteger16AttributeType = 100,
    NSInteger32AttributeType = 200,
    NSInteger64AttributeType = 300,
    NSDecimalAttributeType = 400,
    NSDoubleAttributeType = 500,
    NSFloatAttributeType = 600,
    NSStringAttributeType = 700,
    NSBooleanAttributeType = 800,
    NSDateAttributeType = 900,
    NSBinaryDataAttributeType = 1000,
    NSTransformableAttributeType = 1800,
    NSObjectIDAttributeType = 2000
} NSAttributeType;
</pre>
This means the types available are:
<pre>
Undefined/transient,
short,
integer,
long,
float,
double,
NSDecimalNumber,
NSString,
Boolean,
NSDate,
NSData,
Value transformers,
and id
</pre>


[[Category:CoreData]]
[[Category:CoreData]]

Revision as of 01:44, 8 July 2022

Initial Thoughts

Create a new SwiftUI app selecting the uses CodeData option and then define some schema. In this case I plan to derive from the USGS Earthquake monthly summary data



Links

Attribute Types

typedef enum {
    NSUndefinedAttributeType = 0,
    NSInteger16AttributeType = 100,
    NSInteger32AttributeType = 200,
    NSInteger64AttributeType = 300,
    NSDecimalAttributeType = 400,
    NSDoubleAttributeType = 500,
    NSFloatAttributeType = 600,
    NSStringAttributeType = 700,
    NSBooleanAttributeType = 800,
    NSDateAttributeType = 900,
    NSBinaryDataAttributeType = 1000,
    NSTransformableAttributeType = 1800,
    NSObjectIDAttributeType = 2000
} NSAttributeType;

This means the types available are:

Undefined/transient,
short,
integer,
long,
float,
double,
NSDecimalNumber,
NSString,
Boolean,
NSDate,
NSData,
Value transformers,
and id