1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Add JS bindings for sqlite3_stmt_busy() and sqlite3_stmt_explain().

FossilOrigin-Name: b772edfb44143107d4993bde600d0f4c45184f29a4deee403105c64748c36523
This commit is contained in:
stephan
2024-07-13 14:07:47 +00:00
parent 0b9efaffd7
commit 55a4bea72a
6 changed files with 68 additions and 14 deletions

View File

@ -2043,6 +2043,26 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
return (affirmStmtOpen(this).parameterCount
? capi.sqlite3_bind_parameter_name(this.pointer, ndx)
: undefined);
},
/**
Behaves like sqlite3_stmt_busy() but throws if this statement
is closed and returns a value of type boolean instead of integer.
Added in 3.47.
*/
isBusy: function(){
return 0!==capi.sqlite3_stmt_busy(affirmStmtOpen(this));
},
/**
Behaves like sqlite3_stmt_readonly() but throws if this statement
is closed and returns a value of type boolean instead of integer.
Added in 3.47.
*/
isReadOnly: function(){
return 0!==capi.sqlite3_stmt_readonly(affirmStmtOpen(this));
}
}/*Stmt.prototype*/;