ObjPgSQL/PGConnection.h
Jonathan Schleifer 728b3d1e2a Add -[insertRows:intoTable:].
FossilOrigin-Name: 7b335b3af81d4506f2842748671541073f4c455b4a0ce8a108eab0d43280f3ad
2012-10-06 21:02:01 +00:00

29 lines
641 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: (OFString*)command;
- (PGResult*)executeCommand: (OFString*)command
parameters: (id)firstParameter, ...;
- (PGconn*)PG_connection;
- (void)insertRow: (OFDictionary*)row
intoTable: (OFString*)table;
- (void)insertRows: (OFArray*)rows
intoTable: (OFString*)table;
@end