storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API
Other
2.14k stars 713 forks source link

SELECT - get rows as array instead of JSON #1014

Open nicozenf opened 8 months ago

nicozenf commented 8 months ago

Hello

We use a sqlite database to make run a partial duplication of an online database on android/ios device. We run that on node for testing and debugging and we need of course to make it run on device.

Most of the time, for performance purpose, we ask raw results instead of JSON :

[
   123,
   'abc'
]

instead of

{
   'columnA': 123,
   'columnB': 'abc'
}

In node environnement, we use the "raw" option of better-sqlite3 : https://github.com/WiseLibs/better-sqlite3/blob/master/docs/api.md#rawtogglestate---this

I meet the same option in other plugins too but i can't figure out how to do this on cordova-sqlite-storage.

Is there any way to do that ?

Thank you