Numeric fields in response object

29 views
Skip to first unread message

Magnus Berglund

unread,
Jul 10, 2017, 10:30:14 AM7/10/17
to node-ibm_db
Hi,

I'm using the node db2-driver with Node v6 on IBMi and it's going fairly well but I have two questions I'm hoping someone can help me with. 

1. When executing a SELECT query, all field values in the response objects are strings. Is it possible to have numeric field returned as numbers in the response object or are all fields always returned as strings? 
2. Is it possible to have alphanumeric fields returned as trimmed values in the response object, or will I have to trim them myself either in the SELECT query or JS?

Thanks!

bimaljha

unread,
Jul 10, 2017, 11:30:24 AM7/10/17
to node-ibm_db
Check how test-basic-test.js is returning numeric data. Update connection info in ibm_db/test/config.testConnectionStrings.json file and run "node test/test-basic-test.js" to see the result. Thanks.
Reply all
Reply to author
Forward
0 new messages