From 7dd33a85a537c410cd3b31d661731b1f8d1e7d59 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 10 Sep 2012 11:09:56 +0000 Subject: Rework type handling; reducing the number of paremeters being passed around as well as libpq calls. --- Frameworks/PostgresKit/Source/FLXPostgresResult.m | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Frameworks/PostgresKit/Source/FLXPostgresResult.m') diff --git a/Frameworks/PostgresKit/Source/FLXPostgresResult.m b/Frameworks/PostgresKit/Source/FLXPostgresResult.m index 0d9656d0..9fd44d8c 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresResult.m +++ b/Frameworks/PostgresKit/Source/FLXPostgresResult.m @@ -215,9 +215,18 @@ static NSString *FLXPostgresResultError = @"FLXPostgresResultError"; if (!bytes || !length) return nil; return [NSData dataWithBytes:bytes length:length]; - } + } + + [handler setRow:row]; + [handler setType:type]; + [handler setColumn:column]; + [handler setResult:_result]; + + id object = [handler objectFromResult]; + + [handler setResult:nil]; - return [handler objectFromResult:_result atRow:row column:column]; + return object; } /** -- cgit v1.2.3