mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-24 14:17:58 +03:00
Expose sqlite3_table_column_metadata() to wasm.
FossilOrigin-Name: c31eb509e5cb1025de058132ee9a45d70c84ee47a6abe18811a65ce339f062a0
This commit is contained in:
@@ -92,6 +92,7 @@ _sqlite3_strglob
|
||||
_sqlite3_stricmp
|
||||
_sqlite3_strlike
|
||||
_sqlite3_strnicmp
|
||||
_sqlite3_table_column_metadata
|
||||
_sqlite3_total_changes
|
||||
_sqlite3_total_changes64
|
||||
_sqlite3_trace_v2
|
||||
|
||||
@@ -80,9 +80,9 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
/**
|
||||
Add some descriptive xWrap() aliases for '*' intended to (A)
|
||||
initially improve readability/correctness of capi.signatures
|
||||
and (B) eventually perhaps provide automatic conversion from
|
||||
higher-level representations, e.g. capi.sqlite3_vfs to
|
||||
`sqlite3_vfs*` via capi.sqlite3_vfs.pointer.
|
||||
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(){};
|
||||
@@ -116,14 +116,16 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
|
||||
return capi.sqlite3_vfs_find(v)
|
||||
|| sqlite3.SQLite3Error.toss("Unknown sqlite3_vfs name:",v);
|
||||
}
|
||||
return aPtr((v instanceof capi.sqlite3_vfs) ? v.pointer : v);
|
||||
return aPtr((v instanceof (capi.sqlite3_vfs || nilType))
|
||||
? v.pointer : v);
|
||||
});
|
||||
|
||||
wasm.xWrap.resultAdapter('sqlite3*', aPtr)
|
||||
('sqlite3_context*', aPtr)
|
||||
('sqlite3_stmt*', aPtr)
|
||||
('sqlite3_vfs*', aPtr)
|
||||
('void*', aPtr);
|
||||
const rPtr = wasm.xWrap.resultAdapter('*');
|
||||
wasm.xWrap.resultAdapter('sqlite3*', rPtr)
|
||||
('sqlite3_context*', rPtr)
|
||||
('sqlite3_stmt*', rPtr)
|
||||
('sqlite3_vfs*', rPtr)
|
||||
('void*', rPtr);
|
||||
|
||||
/**
|
||||
Populate api object with sqlite3_...() by binding the "raw" wasm
|
||||
|
||||
@@ -1004,11 +1004,14 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
|
||||
["sqlite3_stricmp", "int", "string", "string"],
|
||||
["sqlite3_strlike", "int", "string", "string","int"],
|
||||
["sqlite3_strnicmp", "int", "string", "string", "int"],
|
||||
["sqlite3_trace_v2", "int", "sqlite3*", "int", "*", "*"],
|
||||
["sqlite3_table_column_metadata", "int",
|
||||
"sqlite3*", "string", "string", "string",
|
||||
"**", "**", "*", "*", "*"],
|
||||
["sqlite3_total_changes", "int", "sqlite3*"],
|
||||
/* Note sqlite3_uri_...() has very specific requirements
|
||||
for their first C-string arguments, so we cannot perform
|
||||
any type conversion on those. */
|
||||
["sqlite3_trace_v2", "int", "sqlite3*", "int", "*", "*"],
|
||||
/* Note that sqlite3_uri_...() have very specific requirements for
|
||||
their first C-string arguments, so we cannot perform any value
|
||||
conversion on those. */
|
||||
["sqlite3_uri_boolean", "int", "sqlite3_filename", "string", "int"],
|
||||
["sqlite3_uri_key", "string", "sqlite3_filename", "int"],
|
||||
["sqlite3_uri_parameter", "string", "sqlite3_filename", "string"],
|
||||
|
||||
Reference in New Issue
Block a user