diff options
author | stephan <stephan@noemail.net> | 2025-06-18 15:37:04 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2025-06-18 15:37:04 +0000 |
commit | 2be0a700ff57a9693ce85d60b30960d09dfbd96d (patch) | |
tree | 8277566f7d7e58d3bb00ad28e1a28b784e9fcaad /ext/wasm/tester1.c-pp.js | |
parent | 3a26f72e20f0063b485e2618060f30f73369c85b (diff) | |
download | sqlite-2be0a700ff57a9693ce85d60b30960d09dfbd96d.tar.gz sqlite-2be0a700ff57a9693ce85d60b30960d09dfbd96d.zip |
Export the column-metadata APIs to WASM. Doing so requires a non-default build of sqlite3.c, so this is a proof-of-concept branch saved just in case SQLITE_ENABLE_COLUMN_METADATA ever becomes the default for sqlite3.c.
FossilOrigin-Name: 59db3f639d1073678805dea26a4686eddfb238f055aa90bd429fc7fd33241502
Diffstat (limited to 'ext/wasm/tester1.c-pp.js')
-rw-r--r-- | ext/wasm/tester1.c-pp.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/wasm/tester1.c-pp.js b/ext/wasm/tester1.c-pp.js index d30e59e38..2fe0c2377 100644 --- a/ext/wasm/tester1.c-pp.js +++ b/ext/wasm/tester1.c-pp.js @@ -3302,7 +3302,7 @@ globalThis.sqlite3InitModule = sqlite3InitModule; .assert(true === await u3.removeVfs()) .assert(false === await P3b.removeVfs()); } - }/*OPFS SAH Pool sanity checks*/) + }/*OPFS SAH Pool sanity checks*/); //////////////////////////////////////////////////////////////////////// T.g('Misc. APIs') @@ -3353,6 +3353,16 @@ globalThis.sqlite3InitModule = sqlite3InitModule; T.assert( 1===n ) .assert( 0===capi.sqlite3_stmt_busy(stmt) ) .assert( !stmt.isBusy() ); + + if( wasm.exports.sqlite3_column_origin_name ){ + log("Column metadata APIs enabled"); + T.assert( "t" === capi.sqlite3_column_table_name(stmt, 0)) + .assert("a" === capi.sqlite3_column_origin_name(stmt, 0)) + .assert("main" === capi.sqlite3_column_database_name(stmt, 0)) + }else{ + log("Column metadata APIs not enabled"); + } // column metadata APIs + stmt.finalize(); db.close(); }) @@ -3364,7 +3374,7 @@ globalThis.sqlite3InitModule = sqlite3InitModule; capi.sqlite3_interrupt(db); T.assert( 0!==capi.sqlite3_is_interrupted(db) ); db.close(); - }) + }); //////////////////////////////////////////////////////////////////////// T.g('Bug Reports') |