Adjust to ObjFW changes

FossilOrigin-Name: b80a03bd2fd4ff11dc0d9c7ce330695ebc060f78034b9ade2d7eb53d88c7bb80
This commit is contained in:
Jonathan Schleifer 2016-02-21 11:08:17 +00:00
parent f9d637e7be
commit 3c16f110f5
6 changed files with 8 additions and 32 deletions

View file

@ -5,13 +5,10 @@
OFString *_command;
}
#ifdef OF_HAVE_PROPERTIES
@property (readonly, copy, nonatomic) OFString *command;
#endif
@property (readonly, copy) OFString *command;
+ (instancetype)exceptionWithConnection: (PGConnection*)connection
command: (OFString*)command;
- initWithConnection: (PGConnection*)connection
command: (OFString*)command;
- (OFString*)command;
@end

View file

@ -1,6 +1,8 @@
#import "PGCommandFailedException.h"
@implementation PGCommandFailedException
@synthesize command = _command;
+ (instancetype)exceptionWithConnection: (PGConnection*)connection
command: (OFString*)command
{
@ -35,9 +37,4 @@
return [OFString stringWithFormat: @"A PostgreSQL command failed: %@\n"
@"Command: %@", _error, _command];
}
- (OFString*)command
{
OF_GETTER(_command, NO)
}
@end

View file

@ -8,11 +8,8 @@
OFString *_error;
}
#ifdef OF_HAVE_PROPERTIES
@property (readonly, retain, nonatomic) PGConnection *connection;
#endif
@property (readonly, retain) PGConnection *connection;
+ (instancetype)exceptionWithConnection: (PGConnection*)connection;
- initWithConnection: (PGConnection*)connection;
- (PGConnection*)connection;
@end

View file

@ -1,6 +1,8 @@
#import "PGException.h"
@implementation PGException
@synthesize connection = _connection;
+ (instancetype)exceptionWithConnection: (PGConnection*)connection
{
return [[[self alloc] initWithConnection: connection] autorelease];
@ -36,9 +38,4 @@
return [OFString stringWithFormat: @"A PostgreSQL operation failed: %@",
_error];
}
- (PGConnection*)connection
{
OF_GETTER(_connection, NO)
}
@end