From a0b76fba5ade5b1c018cb7ebcfae193cec114f5f Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sun, 16 Sep 2012 04:27:12 +0000 Subject: Add the ability to set the default row return type. --- Frameworks/PostgresKit/Source/FLXPostgresResult.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Frameworks/PostgresKit/Source/FLXPostgresResult.h') diff --git a/Frameworks/PostgresKit/Source/FLXPostgresResult.h b/Frameworks/PostgresKit/Source/FLXPostgresResult.h index 4148ba3d..168f8f15 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresResult.h +++ b/Frameworks/PostgresKit/Source/FLXPostgresResult.h @@ -30,7 +30,7 @@ typedef enum } FLXPostgresResultRowType; -@interface FLXPostgresResult : NSObject +@interface FLXPostgresResult : NSObject { void *_result; void **_typeHandlers; @@ -43,6 +43,7 @@ FLXPostgresResultRowType; NSString **_fields; NSStringEncoding _stringEncoding; + FLXPostgresResultRowType _defaultRowType; FLXPostgresConnection *_connection; } @@ -62,6 +63,11 @@ FLXPostgresResultRowType; */ @property (readonly) NSStringEncoding stringEncoding; +/** + * @property defaultRowType The row type that should be used when calling -row. + */ +@property (readwrite, assign) FLXPostgresResultRowType defaultRowType; + - (id)initWithResult:(void *)result connection:(FLXPostgresConnection *)connection; - (NSUInteger)numberOfFields; @@ -70,6 +76,7 @@ FLXPostgresResultRowType; - (NSArray *)fields; +- (id)row; - (NSArray *)rowAsArray; - (NSDictionary *)rowAsDictionary; - (id)rowAsType:(FLXPostgresResultRowType)type; -- cgit v1.2.3