indutny / dukhttp

19 stars 3 forks source link

Sqlite Integration #4

Open mikeptweet opened 3 years ago

mikeptweet commented 3 years ago

Any chance you could splice in sqlite so that it is available within the Javascript context. I've been looking for a simple http server like this but alas, it is beyond my skill set to do it myself.

Thanks ... and great work!

indutny commented 3 years ago

@mikeptweet not that I mind to, but this is probably overblowing the amount of time I'm ready to invest into this (essentially) Proof-of-Concept project. If you are up for it - I'll happily review and merge your Pull Request for sqlite support.

Thank you for kind words!

indutny commented 3 years ago

Well, this probably wasn't a response that you expected. If this of any help, I can guide you through what's required for this work.

gengjiawen commented 3 years ago

@mikeptweet What's your use case ?

mikeptweet commented 3 years ago

I use the sqlite command shell extensively to script various database tasks. Currently I use the command shell utilities to pre/post data coming into and flowing out of the sqlite command shell. I'd like the addition of a lightweight scripting capability to augment this process. I currently use this sqlite extension module (https://github.com/abiliojr/sqlite-js) to leverage duktape but it doesn't provide the functionality I need because it exists only as a function within sqlite. I want the reverse ... the ability to use sqlite from within duktape (something as simple as a single query function like (https://github.com/lspgn/edge-sql).

I know I can do this in node/deno, but I like how lightweight duktape is and the ability to call it over http is awesome.

Thanks.