From dee1a1dddee5bc504aba4f17aeb5748e1eb59c1e Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Mon, 8 Oct 2012 18:52:32 +0000 Subject: [PATCH] Enforce queries to be constant. FossilOrigin-Name: 53f46b10cd4a35208fd4ee2e10dcdb9d21d70bc1b7665bf38d40a779706435c6 --- PGConnection.h | 4 ++-- PGConnection.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PGConnection.h b/PGConnection.h index a4b7f65..ef16f53 100644 --- a/PGConnection.h +++ b/PGConnection.h @@ -18,8 +18,8 @@ - (OFDictionary*)parameters; - (void)connect; - (void)reset; -- (PGResult*)executeCommand: (OFString*)command; -- (PGResult*)executeCommand: (OFString*)command +- (PGResult*)executeCommand: (OFConstantString*)command; +- (PGResult*)executeCommand: (OFConstantString*)command parameters: (id)firstParameter, ...; - (PGconn*)PG_connection; - (void)insertRow: (OFDictionary*)row diff --git a/PGConnection.m b/PGConnection.m index d2cb292..a09aaea 100644 --- a/PGConnection.m +++ b/PGConnection.m @@ -58,7 +58,7 @@ PQreset(conn); } -- (PGResult*)executeCommand: (OFString*)command +- (PGResult*)executeCommand: (OFConstantString*)command { PGresult *result = PQexec(conn, [command UTF8String]); @@ -77,7 +77,7 @@ return nil; } -- (PGResult*)executeCommand: (OFString*)command +- (PGResult*)executeCommand: (OFConstantString*)command parameters: (id)parameter, ... { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];