bindings/js: Add extension loading

This commit is contained in:
Diego Reis 2025-05-26 12:25:43 -03:00
parent dd029b3d37
commit 7dc69c9c39
3 changed files with 23 additions and 12 deletions

View file

@ -112,8 +112,8 @@ class Database {
throw new Error("not implemented");
}
loadExtension(...args) {
throw new Error("not implemented");
loadExtension(path) {
this.db.loadExtension(path);
}
maxWriteReplicationIndex() {
@ -126,11 +126,7 @@ class Database {
* @param {string} sql - The SQL statement string to execute.
*/
exec(sql) {
try {
this.db.exec(sql);
} catch (err) {
throw convertError(err);
}
this.db.exec(sql);
}
/**