Closed nickperkinslondon closed 3 years ago
Which version of odbc are you using? It should be working in 1.x, but it seems like it isn't in 2.x. It should be really easy to add though, all result sets go through the same function so I only have to touch a little bit of code. I'll see what I can do tonight.
Ok, I have pushed 2.1.3. When you create a connection, you can do:
const connection = await odbc.connect({
connectionString: 'YourConnectionString',
fetchArray: true
});
And now your result sets will be an array of arrays, instead of an array of objects
@nickperkinslondon If you are stilling using odbc@^1, examples for how to do this are in these tests:
The tests do pass, so it does appear to work.
The documentation alludes to a connection option that allows returning either OBJECTS or ARRAYS. Looking at the source code seems to indicate that the option "fetchMode:3" might generate ARRAYS....but it doesn't -- I still get objects. Does the option work? Can we have an example?