I’m looking for a library that can use SQL queries on JavaScript objects in a web environment. I tried Alasql, but I’m concerned because it doesn’t support many keywords that I need.
Current situation:
- Files (such as CSVs) uploaded by users of the app are stored in IndexedDB in a columnar format using our own logic.
- I’d like to be able to run SQL queries on this data in the web environment when needed.
Requirements:
- Since we don’t know what kind of CSV users will upload, we can’t ‘precisely’ declare column types, etc., using CREATE TABLE.
- This means it would be the best to query directly from the javascript object/array in memory..
- It should support most of the keywords used in standard SQL.
- Ideally, it should be able to write SQL queries directly on the current columnar data structure.
- If not possible, I’m also considering extracting only the columns needed for the query and changing the data structure to row-wise.
Are there any good libraries that meet these requirements? Thank you.