ObjPgSQL/PGConnection.h
Jonathan Schleifer dee1a1ddde Enforce queries to be constant.
FossilOrigin-Name: 53f46b10cd4a35208fd4ee2e10dcdb9d21d70bc1b7665bf38d40a779706435c6
2012-10-08 18:52:32 +00:00

29 lines
657 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, ...;
- (PGconn*)PG_connection;
- (void)insertRow: (OFDictionary*)row
intoTable: (OFString*)table;
- (void)insertRows: (OFArray*)rows
intoTable: (OFString*)table;
@end