boolean coercion

This commit is contained in:
brianc 2010-10-27 00:31:34 -05:00
parent 5a2ccd657c
commit f04ad8e64c
2 changed files with 14 additions and 1 deletions

View File

@ -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,

View File

@ -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
}];