Skip to content

Commit

Permalink
Merge pull request #305 from strk/master-array-numeric
Browse files Browse the repository at this point in the history
Fix parsing of numeric[], previously returning array of ints
  • Loading branch information
brianc committed Mar 14, 2013
2 parents 0d0737d + f38f9f0 commit fd288be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/types/textParsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ var init = function(register) {
register(1016, parseIntegerArray); // _int8
register(1021, parseFloatArray); // _float4
register(1022, parseFloatArray); // _float8
register(1231, parseIntegerArray); // _numeric
register(1231, parseFloatArray); // _numeric
register(1014, parseStringArray); //char
register(1015, parseStringArray); //varchar
register(1008, parseStringArray);
Expand Down
8 changes: 8 additions & 0 deletions test/unit/client/typed-query-results-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ test('typed results', function() {
expected :function(val){
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]);
}
},

{
Expand Down

0 comments on commit fd288be

Please sign in to comment.