FossilOrigin-Name: 52b090139e1672d79c01e1a7e3d681cd342101efbe04a6c1d4f395c6b65c797a
30 lines
693 B
Objective-C
30 lines
693 B
Objective-C
#include <libpq-fe.h>
|
|
|
|
#import <ObjFW/ObjFW.h>
|
|
|
|
#import "PGResult.h"
|
|
|
|
@interface PGConnection: OFObject
|
|
{
|
|
PGconn *_connnection;
|
|
OFDictionary *_parameters;
|
|
}
|
|
|
|
#ifdef OF_HAVE_PROPERTIES
|
|
@property (copy) OFDictionary *parameters;
|
|
#endif
|
|
|
|
- (void)setParameters: (OFDictionary*)parameters;
|
|
- (OFDictionary*)parameters;
|
|
- (void)connect;
|
|
- (void)reset;
|
|
- (void)close;
|
|
- (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
|