If I store data of type long long (such as 95811454522411188) into a WCDB database and then read and process it, I find that the data is different from before. By examining the source code, I discovered that long long is being stored as a double.
|
return WCTColumnTypeFloat; |
#import "NSNumber+WCTColumnCoding.h"
@implementation NSNumber (WCTColumnCoding)
+ (instancetype)unarchiveWithWCTValue:(NSNumber *)value
{
return value;
}
- (NSNumber *)archivedWCTValue
{
return self;
}
+ (WCTColumnType)columnType
{
return WCTColumnTypeFloat;
}
@end
It's best to explicitly specify whether the database field type is long long or double.