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

Error with "select load extension" #100

Closed
mamereu opened this issue Jan 12, 2021 · 3 comments
Closed

Error with "select load extension" #100

mamereu opened this issue Jan 12, 2021 · 3 comments

Comments

@mamereu
Copy link

mamereu commented Jan 12, 2021

The load_extension(x) is a sqlite3 built-in function, but in deno-sqlite it throws an error:

const db = new DB("books.db")
db.query("SELECT load_extension('/opt/sqlite3/sqlite/ext/misc/regexp.so')")
error: Uncaught SqliteError: no such function: load_extension`

Why is that ? In the shell the same select works without problems.

@dyedgreen
Copy link
Owner

The Deno SQLite package runs SQLite in a WebAssemby runtime. This means, we can't load dynamic libraries/ shared objects at runtime (or at least I'm not aware if this is possible, please do correct me if it is).

This means, that the build of SQLite used here removes the load_extension build in function.

@dyedgreen
Copy link
Owner

Out of curiosity: Which extension are you trying to load?

@craigmulligan
Copy link

I've just run into this too. I was trying to load the fts5 extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants