@@ -27,10 +27,12 @@ #import "PGResult.h" OF_ASSUME_NONNULL_BEGIN +typedef OFDictionary OF_GENERIC(OFString *, id) *PGRow; + @interface PGConnection: OFObject { PGconn *_connection; OFDictionary OF_GENERIC(OFString *, OFString *) *_parameters; } @@ -41,13 +43,12 @@ - (void)connect; - (void)reset; - (void)close; - (nullable PGResult *)executeCommand: (OFConstantString *)command; - (nullable PGResult *)executeCommand: (OFConstantString *)command - parameters: (id)firstParameter, ... OF_SENTINEL; -- (void)insertRow: (OFDictionary *)row - intoTable: (OFString *)table; -- (void)insertRows: (OFArray OF_GENERIC(OFDictionary *) *)rows + parameters: (id)firstParameter, ... OF_SENTINEL; +- (void)insertRow: (PGRow)row intoTable: (OFString *)table; +- (void)insertRows: (OFArray OF_GENERIC(PGRow) *)rows intoTable: (OFString *)table; @end OF_ASSUME_NONNULL_END