Skip to content
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

Feature: SQLite Support #956

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Feature: SQLite Support #956

merged 1 commit into from
Jun 4, 2024

Conversation

sgammon
Copy link
Member

@sgammon sgammon commented Jun 2, 2024

Ready for review Powered by Pull Request Badge

Summary

Adds support for SQLite, with access available via host or guest-side methods; small build fixes otherwise. Does not ship transaction support yet.

  • Basic SQLite support
  • Guest-side API
  • Testsuite for SQLite
  • Tests for guest-side calls
  • Transaction support
  • Query renderer

Changelog

  • feat(sqlite): add native sqlite driver
  • feat(js): add js module for sqlite access
  • feat(base): new BoundResource / LifecycleBoundResources pattern in base
  • feat(engine): new core native library loader, intended to complement static JNI
  • chore: update runtime modules
  • chore: update to latest sqlite jdbc/jni version

Known Issues

We will need to patch the JS module loader to support our custom built-ins prefix, i.e. import x from 'elide:something';. In the meantime, built-in Elide modules are exposed at <module>, with no prefix.

@sgammon sgammon added module:graalvm Modules, changes, and issues relating to GraalVM feature Large PRs or issues with full-blown features sqlite Features or issues relating to SQLite support labels Jun 2, 2024
@sgammon sgammon added this to the Release R6: Alpha 10 milestone Jun 2, 2024
@sgammon sgammon self-assigned this Jun 2, 2024
@sgammon sgammon linked an issue Jun 2, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jun 2, 2024

Codecov Report

Attention: Patch coverage is 76.99620% with 121 lines in your changes missing coverage. Please review.

Project coverage is 54.81%. Comparing base (c7014ca) to head (4867c8b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #956      +/-   ##
==========================================
+ Coverage   53.75%   54.81%   +1.06%     
==========================================
  Files         380      391      +11     
  Lines       11012    11537     +525     
  Branches     1807     1918     +111     
==========================================
+ Hits         5919     6324     +405     
- Misses       4591     4661      +70     
- Partials      502      552      +50     
Flag Coverage Δ
gradle 54.81% <76.99%> (+1.06%) ⬆️
jvm 54.81% <76.99%> (+1.06%) ⬆️
lib 54.81% <76.99%> (+1.06%) ⬆️
plugin 54.81% <76.99%> (+1.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...e/runtime/gvm/internals/node/asserts/NodeAssert.kt 45.76% <ø> (ø)
...e/runtime/intrinsics/sqlite/SQLitePrimitiveType.kt 100.00% <100.00%> (ø)
...elide/runtime/intrinsics/sqlite/SQLiteStatement.kt 100.00% <100.00%> (ø)
...runtime/intrinsics/sqlite/SQLiteTransactionType.kt 100.00% <100.00%> (ø)
...lide/runtime/intrinsics/sqlite/SQLiteTransactor.kt 100.00% <100.00%> (ø)
...otlin/elide/runtime/plugins/js/JavaScriptConfig.kt 96.29% <100.00%> (+0.29%) ⬆️
...src/main/kotlin/elide/runtime/gvm/sqlite/SQLite.kt 93.33% <93.33%> (ø)
.../elide/runtime/intrinsics/sqlite/SQLiteDatabase.kt 92.85% <92.85%> (ø)
...ide/runtime/intrinsics/sqlite/SQLiteTransaction.kt 75.00% <75.00%> (ø)
...n/kotlin/elide/runtime/core/lib/NativeLibraries.kt 0.00% <0.00%> (ø)
... and 3 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7014ca...4867c8b. Read the comment docs.

@sgammon sgammon force-pushed the feat/sqlite branch 2 times, most recently from 6fcf89b to 76549d7 Compare June 2, 2024 09:07
@darvld darvld marked this pull request as ready for review June 2, 2024 19:44
@sgammon sgammon force-pushed the feat/sqlite branch 11 times, most recently from dd87d74 to 2b7a283 Compare June 4, 2024 00:55
- feat(sqlite): add native sqlite driver
- feat(js): add js module for sqlite access
- test: add testsuite for sqlite
- test: add guest-side tests for sqlite (js)
- chore: update runtime modules
- chore: update to latest sqlite jdbc/jni version

Signed-off-by: Sam Gammon <sam@elide.ventures>
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/define-lazy-prop@3.0.0 None 0 4.42 kB sindresorhus
npm/detect-node@2.1.0 None 0 2.76 kB iliakan
npm/di@0.0.1 None 0 7.4 kB vojtajina
npm/diff@5.0.0 None 0 369 kB kpdecker
npm/dom-serialize@2.2.1 None +1 123 kB tootallnate
npm/engine.io-parser@5.2.2 None 0 46.5 kB darrachequesne
npm/engine.io@6.5.4 network +1 182 kB darrachequesne
npm/esbuild@0.20.2 environment, filesystem, network, shell 0 135 kB evanw
npm/etag@1.8.1 filesystem 0 10.8 kB dougwilson
npm/eventemitter3@4.0.7 None 0 38 kB lpinca
npm/express@4.19.2 environment, filesystem, network +10 523 kB wesleytodd
npm/faye-websocket@0.11.4 network 0 30.8 kB jcoglan
npm/fbjs@0.8.18 Transitive: eval, network +5 1.83 MB zpao
npm/flatted@3.3.1 None 0 40.3 kB webreflection
npm/follow-redirects@1.15.6 network 0 29.4 kB rubenverborgh
npm/foreground-child@3.1.1 shell +1 137 kB isaacs
npm/format-util@1.0.5 None 0 7.12 kB tmpfs
npm/fs-extra@8.1.0 filesystem +1 144 kB ryanzim
npm/get-caller-file@2.0.5 None 0 4.72 kB stefanpenner
npm/handle-thing@2.0.1 None 0 12.1 kB indutny
npm/he@1.2.0 None 0 124 kB mathias
npm/hpack.js@2.1.6 None +2 95 kB indutny
npm/html-entities@2.5.2 None 0 287 kB mdevils
npm/http-deceiver@1.2.7 None 0 13.9 kB indutny
npm/http-proxy-middleware@2.0.6 network +3 360 kB chimurai
npm/ipaddr.js@1.9.1 None 0 42.1 kB whitequark
npm/is-docker@3.0.0 None 0 3.15 kB sindresorhus
npm/is-inside-container@1.0.0 None 0 3.48 kB sindresorhus
npm/is-network-error@1.1.0 None 0 4.54 kB sindresorhus
npm/is-plain-obj@3.0.0 None 0 3.82 kB sindresorhus
npm/is-unicode-supported@0.1.0 None 0 3.54 kB sindresorhus
npm/is-wsl@3.1.0 environment 0 3.45 kB sindresorhus
npm/isbinaryfile@4.0.10 filesystem 0 12.5 kB gjtorikian
npm/jackspeak@2.3.6 environment 0 253 kB isaacs
npm/js-yaml@4.1.0 None 0 405 kB vitaly
npm/jszip@2.5.0 None 0 172 kB stuk
npm/karma-chrome-launcher@3.2.0 environment, filesystem +2 50 kB karmarunnerbot
npm/karma-mocha@2.0.1 filesystem 0 27.1 kB karmarunnerbot
npm/karma-sourcemap-loader@0.4.0 None 0 16.8 kB demerzel3
npm/karma-webpack@5.0.1 filesystem Transitive: environment +3 514 kB evilebottnawi
npm/karma@6.4.3 environment, filesystem, network, shell +6 1.02 MB karmarunnerbot
npm/launch-editor@2.6.1 environment, filesystem, shell +1 19.8 kB soda
npm/lodash@4.17.21 None 0 1.41 MB bnjmnt4n
npm/log-symbols@4.1.0 None +2 46.7 kB sindresorhus
npm/memfs@4.9.2 None +1 871 kB streamich
npm/mocha@10.3.0 environment, eval, filesystem +13 2.34 MB joshuakgoldberg
npm/nan@2.19.0 None 0 429 kB kkoopa
npm/node-forge@1.3.1 None 0 1.66 MB davidlehn
npm/node-zip@1.1.1 filesystem 0 8.75 kB daraosn
npm/obuf@1.1.2 None 0 19.1 kB indutny
npm/open@10.1.0 environment 0 55.2 kB sindresorhus
npm/p-retry@6.2.0 None +1 32.1 kB sindresorhus
npm/pako@0.2.9 None 0 741 kB vitaly
npm/path-scurry@1.10.2 filesystem +2 1.5 MB isaacs
npm/prepack@0.2.54 filesystem +1 8.21 MB gaearon
npm/process@0.11.10 None 0 15.3 kB cwmma
npm/range-parser@1.2.1 None 0 8.46 kB dougwilson
npm/react-router-dom@6.23.0 environment 0 971 kB mjackson
npm/react-router@6.23.0 environment 0 810 kB mjackson

🚮 Removed packages: npm/rimraf@3.0.2, npm/safe-buffer@5.1.2, npm/schema-utils@3.3.0, npm/signal-exit@3.0.7, npm/source-map-js@1.2.0, npm/source-map-support@0.5.21, npm/source-map@0.6.1, npm/string-width@5.1.2, npm/string_decoder@1.1.1, npm/tapable@2.2.1, npm/tar@6.2.1, npm/tslib@2.6.2, npm/unpipe@1.0.0, npm/uri-js@4.4.1, npm/util-deprecate@1.0.2, npm/vary@1.1.2, npm/webpack-cli@5.1.4, npm/webpack@5.91.0, npm/which-typed-array@1.1.15, npm/which@2.0.2, npm/wide-align@1.1.5

View full report↗︎

Copy link

sonarcloud bot commented Jun 4, 2024

@sgammon sgammon merged commit 7b356b2 into main Jun 4, 2024
23 checks passed
@sgammon sgammon deleted the feat/sqlite branch June 4, 2024 03:27
@sgammon sgammon mentioned this pull request Jun 18, 2024
@sgammon sgammon mentioned this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Large PRs or issues with full-blown features module:graalvm Modules, changes, and issues relating to GraalVM sqlite Features or issues relating to SQLite support