Merge pull request #305 from strk/master-array-numeric

Fix parsing of numeric[], previously returning array of ints
This commit is contained in:
Brian C 2013-03-14 06:33:57 -07:00
commit fd288be411
2 changed files with 9 additions and 1 deletions

View File

@ -201,7 +201,7 @@ var init = function(register) {
register(1016, parseIntegerArray); // _int8 register(1016, parseIntegerArray); // _int8
register(1021, parseFloatArray); // _float4 register(1021, parseFloatArray); // _float4
register(1022, parseFloatArray); // _float8 register(1022, parseFloatArray); // _float8
register(1231, parseIntegerArray); // _numeric register(1231, parseFloatArray); // _numeric
register(1014, parseStringArray); //char register(1014, parseStringArray); //char
register(1015, parseStringArray); //varchar register(1015, parseStringArray); //varchar
register(1008, parseStringArray); register(1008, parseStringArray);

View File

@ -189,6 +189,14 @@ test('typed results', function() {
expected :function(val){ expected :function(val){
assert.deepEqual(val, ['hello world']); assert.deepEqual(val, ['hello world']);
} }
},{
name : 'array/numeric',
format : 'text',
dataTypeID: 1231,
actual: '{1.2,3.4}',
expected :function(val){
assert.deepEqual(val, [1.2,3.4]);
}
}, },
{ {