ObjPgSQL  Diff

Differences From Artifact [ef78860558]:

To Artifact [b727bf7ced]:


54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
}

- (void)reset
{
	PQreset(conn);
}

- (PGResult*)executeCommand: (OFString*)command
{
	PGresult *result = PQexec(conn, [command UTF8String]);

	if (PQresultStatus(result) == PGRES_FATAL_ERROR) {
		PQclear(result);
		@throw [PGCommandFailedException
		    exceptionWithClass: [self class]
			    connection: self
			       command: command];
	}

	if (PQresultStatus(result) == PGRES_TUPLES_OK)
		return [PGResult PG_resultWithResult: result];

	PQclear(result);
	return nil;
}

- (PGResult*)executeCommand: (OFString*)command
		 parameters: (id)parameter, ...
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	PGresult *result;
	const char **values;
	va_list args, args2;
	int argsCount;







|


















|







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
}

- (void)reset
{
	PQreset(conn);
}

- (PGResult*)executeCommand: (OFConstantString*)command
{
	PGresult *result = PQexec(conn, [command UTF8String]);

	if (PQresultStatus(result) == PGRES_FATAL_ERROR) {
		PQclear(result);
		@throw [PGCommandFailedException
		    exceptionWithClass: [self class]
			    connection: self
			       command: command];
	}

	if (PQresultStatus(result) == PGRES_TUPLES_OK)
		return [PGResult PG_resultWithResult: result];

	PQclear(result);
	return nil;
}

- (PGResult*)executeCommand: (OFConstantString*)command
		 parameters: (id)parameter, ...
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	PGresult *result;
	const char **values;
	va_list args, args2;
	int argsCount;