From f5e507a38ba2a73619cfc3349257507c445464af Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Wed, 16 Jan 2013 22:52:09 +0000 Subject: PostgresKit: Fix the integration tests as well as some issues that they highlighted. --- Frameworks/PostgresKit/Source/PGPostgresConnection.m | 6 +----- Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'Frameworks/PostgresKit/Source') diff --git a/Frameworks/PostgresKit/Source/PGPostgresConnection.m b/Frameworks/PostgresKit/Source/PGPostgresConnection.m index dda021fe..920fc626 100644 --- a/Frameworks/PostgresKit/Source/PGPostgresConnection.m +++ b/Frameworks/PostgresKit/Source/PGPostgresConnection.m @@ -168,11 +168,7 @@ static void _PGPostgresConnectionNoticeProcessor(void *arg, const char *message) */ - (BOOL)connect { - if ([self isConnected]) { - [PGPostgresException raise:PGPostgresConnectionErrorDomain reason:@"Attempt to initiate a connection that is already active"]; - - return NO; - } + if ([self isConnected]) return YES; [self _createConnectionParameters]; diff --git a/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m b/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m index ee8853c7..3de02350 100644 --- a/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m +++ b/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m @@ -118,8 +118,8 @@ PGQueryParamData; _lastQueryWasCancelled = NO; if (!query || - ![query isKindOfClass:[NSString class]] || - ![query isKindOfClass:[PGPostgresStatement class]] || + (![query isKindOfClass:[NSString class]] && + ![query isKindOfClass:[PGPostgresStatement class]]) || ![self isConnected]) { return nil; -- cgit v1.2.3