boolean coercion
This commit is contained in:
parent
5a2ccd657c
commit
f04ad8e64c
@ -178,7 +178,10 @@ Client.dataTypeParser = {
|
||||
26: parseInt,
|
||||
1700: parseFloat,
|
||||
700: parseFloat,
|
||||
701: parseFloat
|
||||
701: parseFloat,
|
||||
16: function(dbVal) {
|
||||
return dbVal === 't';
|
||||
}
|
||||
// 1083: timeParser,
|
||||
// 1266: timeParser,
|
||||
// 1114: dateParser,
|
||||
|
@ -48,6 +48,16 @@ test('typed results', function() {
|
||||
dataTypeID: 701,
|
||||
actual: '1.2',
|
||||
expected: 1.2
|
||||
},{
|
||||
name: 'boolean true',
|
||||
dataTypeID: 16,
|
||||
actual: 't',
|
||||
expected: true
|
||||
},{
|
||||
name: 'boolean false',
|
||||
dataTypeID: 16,
|
||||
actual: 'f',
|
||||
expected: false
|
||||
}];
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user