Use the description for unknown parameter types.
FossilOrigin-Name: 30ae6044d9f9c0594496cf85ef782c14908ada7b242db6a7ea68bee32716240b
This commit is contained in:
parent
d830fda977
commit
e55daef3c0
1 changed files with 7 additions and 4 deletions
|
@ -105,8 +105,8 @@
|
|||
size_t i = 0;
|
||||
|
||||
do {
|
||||
if ([parameter isKindOfClass: [OFNull class]])
|
||||
values[i++] = NULL;
|
||||
if ([parameter isKindOfClass: [OFString class]])
|
||||
values[i++] = [parameter UTF8String];
|
||||
else if ([parameter isKindOfClass: [OFNumber class]]) {
|
||||
switch ([parameter type]) {
|
||||
case OF_NUMBER_BOOL:
|
||||
|
@ -120,8 +120,11 @@
|
|||
UTF8String];
|
||||
break;
|
||||
}
|
||||
} else
|
||||
values[i++] = [parameter UTF8String];
|
||||
} else if ([parameter isKindOfClass: [OFNull class]])
|
||||
values[i++] = NULL;
|
||||
else
|
||||
values[i++] = [[parameter description]
|
||||
UTF8String];
|
||||
} while ((parameter = va_arg(args, id)) != nil);
|
||||
|
||||
result = PQexecParams(conn, [command UTF8String],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue