Add documentation
FossilOrigin-Name: e4c8de38e0a1c749ea0f05f594091f16d659a4d2e329672fb7208a4ff36a77cb
This commit is contained in:
parent
7a728f9bd3
commit
50b4eaa1ed
12 changed files with 185 additions and 21 deletions
|
@ -22,11 +22,25 @@
|
|||
#import "PGResult+Private.h"
|
||||
|
||||
#import "PGConnectionFailedException.h"
|
||||
#import "PGCommandFailedException.h"
|
||||
#import "PGExecuteCommandFailedException.h"
|
||||
|
||||
@implementation PGConnection
|
||||
@synthesize pg_connection = _connection, parameters = _parameters;
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
@try {
|
||||
_parameters = [[OFDictionary alloc] init];
|
||||
} @catch (id e) {
|
||||
[self release];
|
||||
@throw e;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_parameters release];
|
||||
|
@ -84,7 +98,7 @@
|
|||
|
||||
if (PQresultStatus(result) == PGRES_FATAL_ERROR) {
|
||||
PQclear(result);
|
||||
@throw [PGCommandFailedException
|
||||
@throw [PGExecuteCommandFailedException
|
||||
exceptionWithConnection: self
|
||||
command: command];
|
||||
}
|
||||
|
@ -97,7 +111,7 @@
|
|||
return nil;
|
||||
default:
|
||||
PQclear(result);
|
||||
@throw [PGCommandFailedException
|
||||
@throw [PGExecuteCommandFailedException
|
||||
exceptionWithConnection: self
|
||||
command: command];
|
||||
}
|
||||
|
@ -159,7 +173,7 @@
|
|||
return nil;
|
||||
default:
|
||||
PQclear(result);
|
||||
@throw [PGCommandFailedException
|
||||
@throw [PGExecuteCommandFailedException
|
||||
exceptionWithConnection: self
|
||||
command: command];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue