-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In INDEXEDDB, alasql.promise fails to create multiple tables with sql in array, but works with sql as string #1641
Comments
Hi. Can I work on this issue? |
@mathiasrw Assign it please...will take a look into it.. |
I think @mathiasrw or @agershun must assign people to work on an issue (?) |
Happy to assign you :) |
No, not me, but the two other guys above - @ParardhaSarmah and/or @dcode333. |
Have added a PR for the fix. This problem is happening because of how the queries are run when passed in an array causing a race condition in how index db works (the version should be updated everytime we do a DDL query) |
The reason is so simple when you tell it to us like this. Thank you! |
Released as part of v4.0.5 |
When creating multiple tables with the CREATE statements in an array of strings, only the first (nonexisting) table is created.
When concatenating all the CREATE statements in the array into one string, all the tables are created.
In the first case, the code below will fail with
If using LOCALSTORAGE instead of INDEXEDDB, both methods will work.
Code to reproduce (using AlaSQL v3.0.0 build: develop-4287740e):
The text was updated successfully, but these errors were encountered: