Conversation
patricebender
left a comment
There was a problem hiding this comment.
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 |
| const init = initSqlJs({}) | ||
|
|
||
| class WasmSqlite { | ||
| constructor(database) { |
There was a problem hiding this comment.
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! |
| dbc.function('minute', deterministic, d => d === null ? null : toDate(d, true).getUTCMinutes()) | ||
| dbc.function('second', deterministic, d => d === null ? null : toDate(d, true).getUTCSeconds()) | ||
| if (!dbc.memory) dbc.pragma('journal_mode = WAL') | ||
| if (!dbc.memory) dbc.pragma?.('journal_mode = WAL') |
There was a problem hiding this comment.
| if (!dbc.memory) dbc.pragma?.('journal_mode = WAL') | |
| if (!dbc.memory) dbc.pragma?.('journal_mode = WAL') || dbc.exec('PRAGMA journal_mode = WAL') |
There was a problem hiding this comment.
The node:sqlite doesn't have a memory property. So the check also has to be extended.
There was a problem hiding this comment.
dbc.memory??=database === ':memory:'?
sql.js fallback for sqlite in wasmnode:sqlite and sql.js
node:sqlite and sql.jsnode:sqlite and sql.js
|
@BobdenOs merge? |
🤖 I have created a release *beep* *boop* --- <details><summary>db-service: 2.9.0</summary> ## [2.9.0](db-service-v2.8.2...db-service-v2.9.0) (2026-03-09) ### Added * runtime views ([#1410](#1410)) ([5242675](5242675)) * support calculated elements in hierarchies ([#1456](#1456)) ([97c6f66](97c6f66)) ### Fixed * **`exists`:** detect join relevant path after exists ([#1412](#1412)) ([c5bad06](c5bad06)), closes [#1407](#1407) * **cqn2sql:** Relied on inconstistent behavior of cds.ql.cloned queries ([#1500](#1500)) ([f9cb201](f9cb201)) * enable expressions for `inline` ([#1512](#1512)) ([65f78e1](65f78e1)) * path expressions for scoped queries ([#1507](#1507)) ([0f1e234](0f1e234)) * reject duplicated wildcards ([#1511](#1511)) ([b483062](b483062)) * the combination of `iterator` and `SELECT.one` ([#1514](#1514)) ([4b28579](4b28579)) * wildcard on inlined assoc ([#1513](#1513)) ([e520b97](e520b97)) </details> <details><summary>hana: 2.7.0</summary> ## [2.7.0](hana-v2.6.0...hana-v2.7.0) (2026-03-09) ### Added * runtime views ([#1410](#1410)) ([5242675](5242675)) ### Fixed * avoid rollback race condition during .disconnect ([#1502](#1502)) ([4fa5758](4fa5758)) * hana groupby with path expressions ([#1493](#1493)) ([920acde](920acde)) ### Dependencies * The following workspace dependencies were updated * dependencies * @cap-js/db-service bumped from ^2.8.2 to ^2.9.0 </details> <details><summary>postgres: 2.2.0</summary> ## [2.2.0](postgres-v2.1.3...postgres-v2.2.0) (2026-03-09) ### Added * support for `node:sqlite` and `sql.js` ([#614](#614)) ([887d1bb](887d1bb)) ### Fixed * hana groupby with path expressions ([#1493](#1493)) ([920acde](920acde)) ### Dependencies * The following workspace dependencies were updated * dependencies * @cap-js/db-service bumped from ^2.8.2 to ^2.9.0 </details> <details><summary>sqlite: 2.2.0</summary> ## [2.2.0](sqlite-v2.1.3...sqlite-v2.2.0) (2026-03-09) ### Added * support for `node:sqlite` and `sql.js` ([#614](#614)) ([887d1bb](887d1bb)) ### Fixed * hana groupby with path expressions ([#1493](#1493)) ([920acde](920acde)) * the combination of `iterator` and `SELECT.one` ([#1514](#1514)) ([4b28579](4b28579)) ### Dependencies * The following workspace dependencies were updated * dependencies * @cap-js/db-service bumped from ^2.8.2 to ^2.9.0 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: sjvans <30337871+sjvans@users.noreply.github.com>
This PR adds support for
node-sqliteandsql.js(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.