diff --git a/Doxyfile b/Doxyfile index 95944bb..a924fae 100644 --- a/Doxyfile +++ b/Doxyfile @@ -13,5 +13,5 @@ PREDEFINED = OF_DESIGNATED_INITIALIZER= \ OF_SENTINEL MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES -IGNORE_PREFIX = PG +IGNORE_PREFIX = PGSQL EXTRACT_STATIC = yes diff --git a/src/ObjPgSQL.h b/src/ObjPgSQL.h index 428d1bd..15cc62e 100644 --- a/src/ObjPgSQL.h +++ b/src/ObjPgSQL.h @@ -16,10 +16,10 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGResult.h" -#import "PGResultRow.h" -#import "PGConnection.h" +#import "PGSQLResult.h" +#import "PGSQLResultRow.h" +#import "PGSQLConnection.h" -#import "PGException.h" -#import "PGCommandFailedException.h" -#import "PGConnectionFailedException.h" +#import "PGSQLException.h" +#import "PGSQLExecuteCommandFailedException.h" +#import "PGSQLConnectionFailedException.h" diff --git a/src/PGConnection+Private.h b/src/PGSQLConnection+Private.h similarity index 94% rename from src/PGConnection+Private.h rename to src/PGSQLConnection+Private.h index cc3cb18..9138702 100644 --- a/src/PGConnection+Private.h +++ b/src/PGSQLConnection+Private.h @@ -16,11 +16,11 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGConnection.h" +#import "PGSQLConnection.h" OF_ASSUME_NONNULL_BEGIN -@interface PGConnection () +@interface PGSQLConnection () @property (readonly, nonatomic) PGconn *pg_connection; @end diff --git a/src/PGConnection.h b/src/PGSQLConnection.h similarity index 76% rename from src/PGConnection.h rename to src/PGSQLConnection.h index e9f7b54..d2add12 100644 --- a/src/PGConnection.h +++ b/src/PGSQLConnection.h @@ -20,7 +20,7 @@ #import -#import "PGResult.h" +#import "PGSQLResult.h" OF_ASSUME_NONNULL_BEGIN @@ -29,14 +29,14 @@ OF_ASSUME_NONNULL_BEGIN /** * @brief A result row. */ -typedef OFDictionary OF_GENERIC(OFString *, id) *PGRow; +typedef OFDictionary OF_GENERIC(OFString *, id) *PGSQLRow; /** - * @class PGConnection PGConnection.h ObjPgSQL/ObjPgSQL.h + * @class PGSQLConnection PGSQLConnection.h ObjPgSQL/ObjPgSQL.h * * @brief A connection to a database. */ -@interface PGConnection: OFObject +@interface PGSQLConnection: OFObject { PGconn *_connection; OFDictionary OF_GENERIC(OFString *, OFString *) *_parameters; @@ -52,7 +52,7 @@ typedef OFDictionary OF_GENERIC(OFString *, id) *PGRow; /** * @brief Connects to the database. * - * @throw PGConnectionFailedException The connection failed + * @throw PGSQLConnectionFailedException The connection failed */ - (void)connect; @@ -71,9 +71,9 @@ typedef OFDictionary OF_GENERIC(OFString *, id) *PGRow; * * @param command The command to execute * @return The result of the command, if any - * @throw PGCommandFailedException Executing the command failed. + * @throw PGSQLCommandFailedException Executing the command failed. */ -- (nullable PGResult *)executeCommand: (OFConstantString *)command; +- (nullable PGSQLResult *)executeCommand: (OFConstantString *)command; /** * @brief Executes the specified command. @@ -81,10 +81,10 @@ typedef OFDictionary OF_GENERIC(OFString *, id) *PGRow; * @param command The command to execute * @param firstParameter First parameter for the command * @return The result of the command, if any - * @throw PGCommandFailedException Executing the command failed. + * @throw PGSQLCommandFailedException Executing the command failed. */ -- (nullable PGResult *)executeCommand: (OFConstantString *)command - parameters: (id)firstParameter, ... OF_SENTINEL; +- (nullable PGSQLResult *)executeCommand: (OFConstantString *)command + parameters: (id)firstParameter, ... OF_SENTINEL; @end OF_ASSUME_NONNULL_END diff --git a/src/PGConnection.m b/src/PGSQLConnection.m similarity index 85% rename from src/PGConnection.m rename to src/PGSQLConnection.m index af892de..4d6321f 100644 --- a/src/PGConnection.m +++ b/src/PGSQLConnection.m @@ -16,15 +16,15 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGConnection.h" -#import "PGConnection+Private.h" -#import "PGResult.h" -#import "PGResult+Private.h" +#import "PGSQLConnection.h" +#import "PGSQLConnection+Private.h" +#import "PGSQLResult.h" +#import "PGSQLResult+Private.h" -#import "PGConnectionFailedException.h" -#import "PGExecuteCommandFailedException.h" +#import "PGSQLConnectionFailedException.h" +#import "PGSQLExecuteCommandFailedException.h" -@implementation PGConnection +@implementation PGSQLConnection @synthesize pg_connection = _connection, parameters = _parameters; - (instancetype)init @@ -73,7 +73,7 @@ @throw [OFOutOfMemoryException exception]; if (PQstatus(_connection) == CONNECTION_BAD) - @throw [PGConnectionFailedException + @throw [PGSQLConnectionFailedException exceptionWithConnection: self]; objc_autoreleasePoolPop(pool); @@ -92,33 +92,33 @@ _connection = NULL; } -- (PGResult *)executeCommand: (OFConstantString *)command +- (PGSQLResult *)executeCommand: (OFConstantString *)command { PGresult *result = PQexec(_connection, command.UTF8String); if (PQresultStatus(result) == PGRES_FATAL_ERROR) { PQclear(result); - @throw [PGExecuteCommandFailedException + @throw [PGSQLExecuteCommandFailedException exceptionWithConnection: self command: command]; } switch (PQresultStatus(result)) { case PGRES_TUPLES_OK: - return [PGResult pg_resultWithResult: result]; + return [PGSQLResult pg_resultWithResult: result]; case PGRES_COMMAND_OK: PQclear(result); return nil; default: PQclear(result); - @throw [PGExecuteCommandFailedException + @throw [PGSQLExecuteCommandFailedException exceptionWithConnection: self command: command]; } } -- (PGResult *)executeCommand: (OFConstantString *)command - parameters: (id)parameter, ... +- (PGSQLResult *)executeCommand: (OFConstantString *)command + parameters: (id)parameter, ... { void *pool = objc_autoreleasePoolPush(); PGresult *result; @@ -167,13 +167,13 @@ switch (PQresultStatus(result)) { case PGRES_TUPLES_OK: - return [PGResult pg_resultWithResult: result]; + return [PGSQLResult pg_resultWithResult: result]; case PGRES_COMMAND_OK: PQclear(result); return nil; default: PQclear(result); - @throw [PGExecuteCommandFailedException + @throw [PGSQLExecuteCommandFailedException exceptionWithConnection: self command: command]; } diff --git a/src/PGResult+Private.h b/src/PGSQLResult+Private.h similarity index 95% rename from src/PGResult+Private.h rename to src/PGSQLResult+Private.h index 15f2594..ab31ad0 100644 --- a/src/PGResult+Private.h +++ b/src/PGSQLResult+Private.h @@ -16,11 +16,11 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGResult.h" +#import "PGSQLResult.h" OF_ASSUME_NONNULL_BEGIN -@interface PGResult () +@interface PGSQLResult () @property (readonly, nonatomic) PGresult *pg_result; + (instancetype)pg_resultWithResult: (PGresult *)result; diff --git a/src/PGResult.h b/src/PGSQLResult.h similarity index 88% rename from src/PGResult.h rename to src/PGSQLResult.h index e24e6e2..82e3137 100644 --- a/src/PGResult.h +++ b/src/PGSQLResult.h @@ -22,17 +22,17 @@ OF_ASSUME_NONNULL_BEGIN -@class PGResultRow; +@class PGSQLResultRow; /** - * @class PGResult PGResult.h ObjPgSQL/ObjPgSQL.h + * @class PGSQLResult PGSQLResult.h ObjPgSQL/ObjPgSQL.h * * @brief A PostgreSQL result. * * This is a regular OFArray, where each entry in the array represents a result * row. */ -@interface PGResult: OFArray OF_GENERIC(PGResultRow *) +@interface PGSQLResult: OFArray OF_GENERIC(PGSQLResultRow *) { PGresult *_result; } diff --git a/src/PGResult.m b/src/PGSQLResult.m similarity index 86% rename from src/PGResult.m rename to src/PGSQLResult.m index 19f8e3c..9798f21 100644 --- a/src/PGResult.m +++ b/src/PGSQLResult.m @@ -16,12 +16,12 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGResult.h" -#import "PGResult+Private.h" -#import "PGResultRow.h" -#import "PGResultRow+Private.h" +#import "PGSQLResult.h" +#import "PGSQLResult+Private.h" +#import "PGSQLResultRow.h" +#import "PGSQLResultRow+Private.h" -@implementation PGResult +@implementation PGSQLResult @synthesize pg_result = _result; + (instancetype)pg_resultWithResult: (PGresult *)result @@ -56,6 +56,6 @@ if (index > LONG_MAX || (long)index > PQntuples(_result)) @throw [OFOutOfRangeException exception]; - return [PGResultRow pg_rowWithResult: self row: (int)index]; + return [PGSQLResultRow pg_rowWithResult: self row: (int)index]; } @end diff --git a/src/PGResultRow+Private.h b/src/PGSQLResultRow+Private.h similarity index 81% rename from src/PGResultRow+Private.h rename to src/PGSQLResultRow+Private.h index 115d84a..15b9509 100644 --- a/src/PGResultRow+Private.h +++ b/src/PGSQLResultRow+Private.h @@ -16,13 +16,13 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGResultRow.h" +#import "PGSQLResultRow.h" OF_ASSUME_NONNULL_BEGIN -@interface PGResultRow () -+ (instancetype)pg_rowWithResult: (PGResult *)result row: (int)row; -- (instancetype)pg_initWithResult: (PGResult *)result row: (int)row; +@interface PGSQLResultRow () ++ (instancetype)pg_rowWithResult: (PGSQLResult *)result row: (int)row; +- (instancetype)pg_initWithResult: (PGSQLResult *)result row: (int)row; @end OF_ASSUME_NONNULL_END diff --git a/src/PGResultRow.h b/src/PGSQLResultRow.h similarity index 86% rename from src/PGResultRow.h rename to src/PGSQLResultRow.h index 26fdf35..06cd335 100644 --- a/src/PGResultRow.h +++ b/src/PGSQLResultRow.h @@ -20,21 +20,21 @@ #import -#import "PGResult.h" +#import "PGSQLResult.h" OF_ASSUME_NONNULL_BEGIN /** - * @class PGResult PGResult.h ObjPgSQL/ObjPgSQL.h + * @class PGSQLResult PGSQLResult.h ObjPgSQL/ObjPgSQL.h * * @brief A PostgreSQL result row. * * This is a regular OFDictionary, where each entry in the dictionary * represents a column of the result row. */ -@interface PGResultRow: OFDictionary OF_GENERIC(OFString *, id) +@interface PGSQLResultRow: OFDictionary OF_GENERIC(OFString *, id) { - PGResult *_result; + PGSQLResult *_result; PGresult *_res; int _row; } diff --git a/src/PGResultRow.m b/src/PGSQLResultRow.m similarity index 83% rename from src/PGResultRow.m rename to src/PGSQLResultRow.m index 4242c0c..edc1e4d 100644 --- a/src/PGResultRow.m +++ b/src/PGSQLResultRow.m @@ -16,8 +16,8 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGResultRow.h" -#import "PGResult+Private.h" +#import "PGSQLResultRow.h" +#import "PGSQLResult+Private.h" static id convertType(PGresult *res, int column, OFString *string) @@ -46,29 +46,29 @@ convertType(PGresult *res, int column, OFString *string) return string; } -@interface PGResultRowEnumerator: OFEnumerator +@interface PGSQLResultRowEnumerator: OFEnumerator { - PGResult *_result; + PGSQLResult *_result; PGresult *_res; int _row, _pos, _count; } -- (instancetype)initWithResult: (PGResult*)result row: (int)row; +- (instancetype)initWithResult: (PGSQLResult*)result row: (int)row; @end -@interface PGResultRowKeyEnumerator: PGResultRowEnumerator +@interface PGSQLResultRowKeyEnumerator: PGSQLResultRowEnumerator @end -@interface PGResultRowObjectEnumerator: PGResultRowEnumerator +@interface PGSQLResultRowObjectEnumerator: PGSQLResultRowEnumerator @end -@implementation PGResultRow -+ (instancetype)pg_rowWithResult: (PGResult *)result row: (int)row +@implementation PGSQLResultRow ++ (instancetype)pg_rowWithResult: (PGSQLResult *)result row: (int)row { return [[[self alloc] pg_initWithResult: result row: row] autorelease]; } -- (instancetype)pg_initWithResult: (PGResult *)result row: (int)row +- (instancetype)pg_initWithResult: (PGSQLResult *)result row: (int)row { self = [super init]; @@ -115,14 +115,14 @@ convertType(PGresult *res, int column, OFString *string) - (OFEnumerator *)keyEnumerator { - return [[[PGResultRowKeyEnumerator alloc] + return [[[PGSQLResultRowKeyEnumerator alloc] initWithResult: _result row: _row] autorelease]; } - (OFEnumerator *)objectEnumerator { - return [[[PGResultRowObjectEnumerator alloc] + return [[[PGSQLResultRowObjectEnumerator alloc] initWithResult: _result row: _row] autorelease]; } @@ -160,8 +160,8 @@ convertType(PGresult *res, int column, OFString *string) } @end -@implementation PGResultRowEnumerator -- (instancetype)initWithResult: (PGResult *)result row: (int)row +@implementation PGSQLResultRowEnumerator +- (instancetype)initWithResult: (PGSQLResult *)result row: (int)row { self = [super init]; @@ -186,7 +186,7 @@ convertType(PGresult *res, int column, OFString *string) } @end -@implementation PGResultRowKeyEnumerator +@implementation PGSQLResultRowKeyEnumerator - (id)nextObject { if (_pos >= _count) @@ -202,7 +202,7 @@ convertType(PGresult *res, int column, OFString *string) } @end -@implementation PGResultRowObjectEnumerator +@implementation PGSQLResultRowObjectEnumerator - (id)nextObject { id object; diff --git a/src/exceptions/PGConnectionFailedException.h b/src/exceptions/PGSQLConnectionFailedException.h similarity index 86% rename from src/exceptions/PGConnectionFailedException.h rename to src/exceptions/PGSQLConnectionFailedException.h index a4cfb00..be620ed 100644 --- a/src/exceptions/PGConnectionFailedException.h +++ b/src/exceptions/PGSQLConnectionFailedException.h @@ -16,17 +16,17 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGException.h" +#import "PGSQLException.h" OF_ASSUME_NONNULL_BEGIN /** - * @class PGConnectionFailedException PGConnectionFailedException.h + * @class PGSQLConnectionFailedException PGSQLConnectionFailedException.h * PgSQL/PgSQL.h * * @brief An exception indicating that connecting to the database failed. */ -@interface PGConnectionFailedException: PGException +@interface PGSQLConnectionFailedException: PGSQLException @end OF_ASSUME_NONNULL_END diff --git a/src/exceptions/PGConnectionFailedException.m b/src/exceptions/PGSQLConnectionFailedException.m similarity index 91% rename from src/exceptions/PGConnectionFailedException.m rename to src/exceptions/PGSQLConnectionFailedException.m index e6df6ed..1a21b17 100644 --- a/src/exceptions/PGConnectionFailedException.m +++ b/src/exceptions/PGSQLConnectionFailedException.m @@ -16,9 +16,9 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGConnectionFailedException.h" +#import "PGSQLConnectionFailedException.h" -@implementation PGConnectionFailedException +@implementation PGSQLConnectionFailedException - (OFString *)description { return [OFString stringWithFormat: diff --git a/src/exceptions/PGException.h b/src/exceptions/PGSQLException.h similarity index 82% rename from src/exceptions/PGException.h rename to src/exceptions/PGSQLException.h index 038453d..7fb9485 100644 --- a/src/exceptions/PGException.h +++ b/src/exceptions/PGSQLException.h @@ -18,25 +18,25 @@ #import -#import "PGConnection.h" +#import "PGSQLConnection.h" OF_ASSUME_NONNULL_BEGIN /** - * @class PGException PGException.h ObjPgSQL/ObjPgSQL.h + * @class PGSQLException PGSQLException.h ObjPgSQL/ObjPgSQL.h * * @brief A PostgreSQL exception. */ -@interface PGException: OFException +@interface PGSQLException: OFException { - PGConnection *_connection; + PGSQLConnection *_connection; OFString *_errorMessage; } /** * @brief The connection for which the exception occurred. */ -@property (readonly, nonatomic) PGConnection *connection; +@property (readonly, nonatomic) PGSQLConnection *connection; /** * @brief An error message for the exception. @@ -51,7 +51,7 @@ OF_ASSUME_NONNULL_BEGIN * @param connection The connection for which the exception occurred * @return A new, autoreleased PostgreSQL exception */ -+ (instancetype)exceptionWithConnection: (PGConnection *)connection; ++ (instancetype)exceptionWithConnection: (PGSQLConnection *)connection; - (instancetype)init OF_UNAVAILABLE; @@ -61,7 +61,7 @@ OF_ASSUME_NONNULL_BEGIN * @param connection The connection for which the exception occurred * @return An initialized PostgreSQL exception */ -- (instancetype)initWithConnection: (PGConnection *)connection +- (instancetype)initWithConnection: (PGSQLConnection *)connection OF_DESIGNATED_INITIALIZER; @end diff --git a/src/exceptions/PGException.m b/src/exceptions/PGSQLException.m similarity index 87% rename from src/exceptions/PGException.m rename to src/exceptions/PGSQLException.m index 827e695..1979851 100644 --- a/src/exceptions/PGException.m +++ b/src/exceptions/PGSQLException.m @@ -16,10 +16,10 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGException.h" -#import "PGConnection+Private.h" +#import "PGSQLException.h" +#import "PGSQLConnection+Private.h" -@implementation PGException +@implementation PGSQLException @synthesize connection = _connection, errorMessage = _errorMessage; + (instancetype)exception @@ -27,7 +27,7 @@ OF_UNRECOGNIZED_SELECTOR } -+ (instancetype)exceptionWithConnection: (PGConnection *)connection ++ (instancetype)exceptionWithConnection: (PGSQLConnection *)connection { return [[[self alloc] initWithConnection: connection] autorelease]; } @@ -37,7 +37,7 @@ OF_INVALID_INIT_METHOD } -- (instancetype)initWithConnection: (PGConnection *)connection +- (instancetype)initWithConnection: (PGSQLConnection *)connection { self = [super init]; diff --git a/src/exceptions/PGExecuteCommandFailedException.h b/src/exceptions/PGSQLExecuteCommandFailedException.h similarity index 79% rename from src/exceptions/PGExecuteCommandFailedException.h rename to src/exceptions/PGSQLExecuteCommandFailedException.h index 00a3b2a..6989735 100644 --- a/src/exceptions/PGExecuteCommandFailedException.h +++ b/src/exceptions/PGSQLExecuteCommandFailedException.h @@ -16,17 +16,18 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGException.h" +#import "PGSQLException.h" OF_ASSUME_NONNULL_BEGIN /** - * @class PGExecuteCommandFailedException PGExecuteCommandFailedException.h + * @class PGSQLExecuteCommandFailedException + * PGSQLExecuteCommandFailedException.h * ObjPgSQL/ObjPgSQL.h * * @brief An exception indicating that executing a command failed. */ -@interface PGExecuteCommandFailedException: PGException +@interface PGSQLExecuteCommandFailedException: PGSQLException { OFConstantString *_command; } @@ -36,7 +37,7 @@ OF_ASSUME_NONNULL_BEGIN */ @property (readonly, nonatomic) OFConstantString *command; -+ (instancetype)exceptionWithConnection: (PGConnection *)connection ++ (instancetype)exceptionWithConnection: (PGSQLConnection *)connection OF_UNAVAILABLE; /** @@ -46,10 +47,11 @@ OF_ASSUME_NONNULL_BEGIN * @param command The command which could not be executed * @return A new, autoreleased execute command failed exception */ -+ (instancetype)exceptionWithConnection: (PGConnection *)connection ++ (instancetype)exceptionWithConnection: (PGSQLConnection *)connection command: (OFConstantString *)command; -- (instancetype)initWithConnection: (PGConnection *)connection OF_UNAVAILABLE; +- (instancetype)initWithConnection: (PGSQLConnection *)connection + OF_UNAVAILABLE; /** * @brief Initializes an already allocated execte command failed exception. @@ -58,7 +60,7 @@ OF_ASSUME_NONNULL_BEGIN * @param command The command which could not be executed * @return An initialized execute command failed exception */ -- (instancetype)initWithConnection: (PGConnection *)connection +- (instancetype)initWithConnection: (PGSQLConnection *)connection command: (OFConstantString *)command OF_DESIGNATED_INITIALIZER; @end diff --git a/src/exceptions/PGExecuteCommandFailedException.m b/src/exceptions/PGSQLExecuteCommandFailedException.m similarity index 80% rename from src/exceptions/PGExecuteCommandFailedException.m rename to src/exceptions/PGSQLExecuteCommandFailedException.m index 780df4c..833b6c3 100644 --- a/src/exceptions/PGExecuteCommandFailedException.m +++ b/src/exceptions/PGSQLExecuteCommandFailedException.m @@ -16,29 +16,29 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#import "PGExecuteCommandFailedException.h" +#import "PGSQLExecuteCommandFailedException.h" -@implementation PGExecuteCommandFailedException +@implementation PGSQLExecuteCommandFailedException @synthesize command = _command; -+ (instancetype)exceptionWithConnection: (PGConnection *)connection ++ (instancetype)exceptionWithConnection: (PGSQLConnection *)connection { OF_UNRECOGNIZED_SELECTOR } -+ (instancetype)exceptionWithConnection: (PGConnection *)connection ++ (instancetype)exceptionWithConnection: (PGSQLConnection *)connection command: (OFConstantString *)command { return [[[self alloc] initWithConnection: connection command: command] autorelease]; } -- (instancetype)initWithConnection: (PGConnection *)connection +- (instancetype)initWithConnection: (PGSQLConnection *)connection { OF_INVALID_INIT_METHOD } -- (instancetype)initWithConnection: (PGConnection *)connection +- (instancetype)initWithConnection: (PGSQLConnection *)connection command: (OFConstantString *)command { self = [super initWithConnection: connection]; diff --git a/src/exceptions/meson.build b/src/exceptions/meson.build index 63325fd..d14f6d5 100644 --- a/src/exceptions/meson.build +++ b/src/exceptions/meson.build @@ -1,5 +1,5 @@ exceptions_sources = files( - 'PGConnectionFailedException.m', - 'PGException.m', - 'PGExecuteCommandFailedException.m', + 'PGSQLConnectionFailedException.m', + 'PGSQLException.m', + 'PGSQLExecuteCommandFailedException.m', ) diff --git a/src/meson.build b/src/meson.build index f4fed49..dc53a85 100644 --- a/src/meson.build +++ b/src/meson.build @@ -3,9 +3,9 @@ fs = import('fs') subdir('exceptions') sources = files( - 'PGConnection.m', - 'PGResult.m', - 'PGResultRow.m', + 'PGSQLConnection.m', + 'PGSQLResult.m', + 'PGSQLResultRow.m', ) objpgsql = library('objpgsql', diff --git a/tests/Tests.m b/tests/Tests.m index bfe98cd..8b9fc89 100644 --- a/tests/Tests.m +++ b/tests/Tests.m @@ -18,12 +18,11 @@ #import -#import "PGConnection.h" -#import "PGConnectionFailedException.h" +#import "ObjPgSQL.h" @interface Test: OFObject { - PGConnection *_connection; + PGSQLConnection *_connection; } @end @@ -34,9 +33,9 @@ OF_APPLICATION_DELEGATE(Test) { OFString *username = [[OFApplication environment] objectForKey: @"USER"]; - PGResult *result; + PGSQLResult *result; - _connection = [[PGConnection alloc] init]; + _connection = [[PGSQLConnection alloc] init]; [_connection setParameters: [OFDictionary dictionaryWithKeysAndObjects: @"user", username, @"dbname", username,