1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Initial pieces for binding the session API to JS. Far from complete. See [forum:210e36a1e3 | forum post 210e36a1e3] for the discussion.

FossilOrigin-Name: cd8c100808da1043fcf63555f48f30c90272c48c6627321ceb0a0995b34733d1
This commit is contained in:
stephan
2022-12-23 11:46:26 +00:00
parent dc02d5658b
commit cc1cc9d7b7
5 changed files with 70 additions and 16 deletions

View File

@ -332,10 +332,10 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
if(1){// WhWasmUtil.xWrap() bindings...
/**
Add some descriptive xWrap() aliases for '*' intended to (A)
initially improve readability/correctness of capi.signatures
and (B) provide automatic conversion from higher-level
representations, e.g. capi.sqlite3_vfs to `sqlite3_vfs*` via
capi.sqlite3_vfs.pointer.
initially improve readability/correctness of
wasm.bindingSignatures and (B) provide automatic conversion
from higher-level representations, e.g. capi.sqlite3_vfs to
`sqlite3_vfs*` via capi.sqlite3_vfs.pointer.
*/
const aPtr = wasm.xWrap.argAdapter('*');
const nilType = function(){};
@ -343,6 +343,10 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
('sqlite3_context*', aPtr)
('sqlite3_value*', aPtr)
('void*', aPtr)
('sqlite3_changegroup*', aPtr)
('sqlite3_changeset_iter*', aPtr)
//('sqlite3_rebaser*', aPtr)
('sqlite3_session*', aPtr)
('sqlite3_stmt*', (v)=>
aPtr((v instanceof (sqlite3?.oo1?.Stmt || nilType))
? v.pointer : v))