Core Data NSAttribute Type 数据类型
一:使用Core Data 的可用数据类型
NSAttributeType
Defines the possible types of NSAttributeType properties. These explicitly distinguish between bit sizes to ensure data store independence.
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;
Constants
NSUndefinedAttributeType
Specifies an undefined attribute type.
NSUndefinedAttributeType is valid for transient properties—Core Data will still track the property as an id value and register undo/redo actions, and so on. NSUndefinedAttributeType is illegal for non-transient properties.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSInteger16AttributeType
Specifies a 16-bit signed integer attribute.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSInteger32AttributeType
Specifies a 32-bit signed integer attribute.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSInteger64AttributeType
Specifies a 64-bit signed integer attribute.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSDecimalAttributeType
Specifies an NSDecimalNumber attribute.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSDoubleAttributeType
Specifies a double attribute.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSFloatAttributeType
Specifies a float attribute.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSStringAttributeType
Specifies an NSString attribute.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSBooleanAttributeType
Specifies a Boolean attribute.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSDateAttributeType
Specifies an NSDate attribute.
Times are specified in GMT.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSBinaryDataAttributeType
Specifies an NSData attribute.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSTransformableAttributeType
Specifies an attribute that uses a value transformer.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
NSObjectIDAttributeType
Specifies the object ID attribute.
Available in iOS 3.0 and later.
Declared in NSAttributeDescription.h.
Availability
Available in iOS 3.0 and later.
Declared In
NSAttributeDescription.h
二:类型
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;
三:
http://stackoverflow.com/questions/10546632/list-of-core-data-attribute-types
分类:
OC
标签:
core data
, core data 数据类型
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具