sql-js / sql-js/sql.js

Adding the series extension

Aperta
#552 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
13.7k
Fork
1.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hello 👋

I'm trying to add the generate_series function from the series extension to the SQLite build.

At the moment, here is what I have done so far:

  • modify the Makefile so it downloads the series.c file automatically and puts it in the sql-amalgation folder.
  • modify the Makefile so it builds the series.c file and add it to the wasm output.
  • include the _sqlite3_series_init function to the src/exported_functions.json file
  • (this is where it errors) modify the src/api.js file so it calls the sqlite3_series_init function

I read #459 and it seems like we had to do this...?

when running the tests, I'm getting the following error:

  ⚡ RuntimeError: function signature mismatch
        at sqlite3_series_init (<anonymous>:wasm-function[2577]:0x82a1e)
        at Module._sqlite3_series_init (/workspaces/sql.js/dist/sql-wasm.js:6140:105)
        at new Database (/workspaces/sql.js/dist/sql-wasm.js:937:22)
        at Object.exports.test (/workspaces/sql.js/test/test_generate_series.js:4:14)
        at test generate series (/workspaces/sql.js/test/test_generate_series.js:22:17)
        at test (/workspaces/sql.js/node_modules/test/test.js:29:20)
        at next (/workspaces/sql.js/node_modules/test/test.js:69:7)
        at suite (/workspaces/sql.js/node_modules/test/test.js:71:5)
        at Object.run (/workspaces/sql.js/node_modules/test/test.js:87:3)
        at /workspaces/sql.js/test/test_generate_series.js:20:21

Here is my fork with all the modifications I have made: https://github.com/Androz2091/sql.js

Can someone help me to understand? Maybe @twoxfh, and @rhashimoto, who solved the issue #459?

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Start with the Makefile, src/exported_functions.json, and src/api.js to trace how series.c is built and initialized. Run test/test_generate_series.js and inspect the reported signature mismatch. Done means the SQLite build initializes the series extension successfully and the generate_series tests pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, sqlite, wasm
Ambito
api, build-system, database
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.