Convert floats to native objects as well.
FossilOrigin-Name: 7a033e34c4e334f5b663b7c5e2f10eb8e3fe9a8a0de96a64b352fc4a1e37b410
This commit is contained in:
parent
e55daef3c0
commit
9a98086e25
1 changed files with 8 additions and 4 deletions
|
@ -15,6 +15,10 @@ convert_type(PGresult *res, int col, OFString *str)
|
|||
return [OFNumber numberWithInt32: (int32_t)[str decimalValue]];
|
||||
case 20: /* INT8OID */
|
||||
return [OFNumber numberWithInt64: (int64_t)[str decimalValue]];
|
||||
case 700: /* FLOAT4OID */
|
||||
return [OFNumber numberWithFloat: [str floatValue]];
|
||||
case 701: /* FLOAT8OID */
|
||||
return [OFNumber numberWithDouble: [str doubleValue]];
|
||||
}
|
||||
|
||||
return str;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue