From 255db553f9ebf80f712b6002ea528f30252d30d4 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Thu, 6 Sep 2012 08:45:51 +0000 Subject: PostgresKit: Expose number handling methods. --- Frameworks/PostgresKit/Source/FLXPostgresTypeNumberHandler.h | 4 ++++ Frameworks/PostgresKit/Source/FLXPostgresTypeNumberHandler.m | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'Frameworks/PostgresKit/Source') diff --git a/Frameworks/PostgresKit/Source/FLXPostgresTypeNumberHandler.h b/Frameworks/PostgresKit/Source/FLXPostgresTypeNumberHandler.h index a3305e19..375251d4 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresTypeNumberHandler.h +++ b/Frameworks/PostgresKit/Source/FLXPostgresTypeNumberHandler.h @@ -24,5 +24,9 @@ @interface FLXPostgresTypeNumberHandler : FLXPostgresTypeHandler +- (Float64)float64FromBytes:(const void *)bytes; + +- (NSNumber *)integerObjectFromBytes:(const void *)bytes length:(NSUInteger)length; + @end diff --git a/Frameworks/PostgresKit/Source/FLXPostgresTypeNumberHandler.m b/Frameworks/PostgresKit/Source/FLXPostgresTypeNumberHandler.m index 0c75e282..b31b4a34 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresTypeNumberHandler.m +++ b/Frameworks/PostgresKit/Source/FLXPostgresTypeNumberHandler.m @@ -283,9 +283,9 @@ static FLXPostgresOid FLXPostgresTypeNumberTypes[] = case 'd': // Double (*type) = FLXPostgresOidFloat8; return [self remoteDataFromFloat64:[(NSNumber *)object doubleValue]]; + default: + return nil; } - - return nil; } - (id)objectFromRemoteData:(const void *)bytes length:(NSUInteger)length type:(FLXPostgresOid)type -- cgit v1.2.3