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

Add convenience variants of sqlite3.wasm.peek/poke() for each numeric type to help reduce errors related to typos in the final argument (type-name strings). If wasm.xWrap.FuncPtrAdapter is called as a function, instead of a constructor, it now behaves as if it were called as a constructor (previously it threw an exception).

FossilOrigin-Name: 14e3fc01b929fa3f9a2fdbd93deb4a8aad58c111d46369c772def0437152fa75
This commit is contained in:
stephan
2022-12-14 14:28:54 +00:00
parent bca56f384f
commit feb9123a8c
6 changed files with 80 additions and 20 deletions

View File

@ -442,9 +442,8 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
}else if('string'===typeof opt.rowMode && opt.rowMode.length>1){
/* "$X": fetch column named "X" (case-sensitive!). Prior
to 2022-12-14 ":X" and "@X" were also permitted, but
that seems unnecessary and likely to cause
confusion. $ is the clear usability winner because it
doesn't require quoting in JS. */
having so many options is unnecessary and likely to
cause confusion. */
if('$'===opt.rowMode[0]){
out.cbArg = function(stmt){
const rc = stmt.get(this.obj)[this.colName];