jvail/spl.js

SQLite extensions

spaciandd opened this issue · 13 comments

I need to load stats extension. Is there any way ?

jvail commented

Hi, I am afraid no. It needs to be included during compilation. Also I am not sure about the quality of this extension: It is not an official sqlite extension. But I'd guess with some research you could implement it in plain SQL e.g. https://stackoverflow.com/questions/1123576/how-to-find-nth-percentile-with-sqlite

P.S.
I have just seen that sql.js has included the extension-functions.c. So I guess then I could give it a try and add the file from the repo you suggested.

PPS
I think this looks quite interesting: https://github.com/nalgeon/sqlean

Hi, thanks for reply, do you have any plans to add loadExtension api ?

jvail commented

Hi, thanks for reply, do you have any plans to add loadExtension api ?

I think - at least to my current understanding - this is impossible because WebAssembly has no way to load/link other wasm files dynamically.

jvail commented

@spaciandd Please checkout the new version. I'll pin this issue and rename it so I can reuse it for other extensions.