-
Notifications
You must be signed in to change notification settings - Fork 24
feat: Add sql.js fallback for sqlite in wasm
#614
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
base: main
Are you sure you want to change the base?
Conversation
patricebender
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool :) Should we run the tests with sql.js as optional tests as part of the PRs? Alternatively we could also run them after merge. What do you think?
|
Verification that the |
sqlite/lib/sql.js.js
Outdated
| const init = initSqlJs({}) | ||
|
|
||
| class WasmSqlite { | ||
| constructor(database) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get rid of this warning?
|
@BobdenOs @danjoa @patricebender are there any further interests on your side to enable this feature for the |
|
@petermuessig the current state should be up-to-date again. Currently the only blocker is that the |
|
@BobdenOs thanks for the information. As said in our chat, I'll verify the workaround you provided for me so far to check whether I can run UI5 applications against the CDS server running on sql.js in the web container. I will let you know whether all works fine... BIG THX again! |
This PR adds support for another
SQLitedriversql.jsis a browser orientated driver which compilesSQLitetowasm.Enabling the possibility to run cds with
@cap-js/sqlitein more environments.For example
better-sqlite3cannot be loaded into the defaultnpmpromoted online environmentrunkit:https://runkit.com/bobdenos/cds-test
There are some limitations with
sql.jswhen comparing tobetter-sqlite3. Which is mostly that it uses more memory and is around 50% slower for running the@cap-js/sqlitetests. Wherebetter-sqlite3takes~10seconds to run all tests. It takessql.js~14seconds, but all current tests are green. Which should be good enough for experimentation scenarios.