ObjPgSQL/PGConnection.h
Jonathan Schleifer a5aa71484f Make use of OF_SENTINEL.
FossilOrigin-Name: 455ca009cddd89b64802c95292b969127474f1dd22ede2ce56d5eba16fb1b517
2012-10-30 17:51:15 +00:00

29 lines
669 B
Objective-C

#include <libpq-fe.h>
#import <ObjFW/ObjFW.h>
#import "PGResult.h"
@interface PGConnection: OFObject
{
PGconn *conn;
OFDictionary *parameters;
}
#ifdef OF_HAVE_PROPERTIES
@property (copy) OFDictionary *parameters;
#endif
- (void)setParameters: (OFDictionary*)parameters;
- (OFDictionary*)parameters;
- (void)connect;
- (void)reset;
- (PGResult*)executeCommand: (OFConstantString*)command;
- (PGResult*)executeCommand: (OFConstantString*)command
parameters: (id)firstParameter, ... OF_SENTINEL;
- (PGconn*)PG_connection;
- (void)insertRow: (OFDictionary*)row
intoTable: (OFString*)table;
- (void)insertRows: (OFArray*)rows
intoTable: (OFString*)table;
@end