aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/tester1.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2024-04-22 17:03:52 +0000
committerstephan <stephan@noemail.net>2024-04-22 17:03:52 +0000
commit5d8daf184d94e86695f45ea8b8b37e9517f7b000 (patch)
treebe06dd5003a41566799f63cdac0b5afe0ccee650 /ext/wasm/tester1.c-pp.js
parent0a42e9913b233d433bd526c4c76825d0e1785bb6 (diff)
downloadsqlite-5d8daf184d94e86695f45ea8b8b37e9517f7b000.tar.gz
sqlite-5d8daf184d94e86695f45ea8b8b37e9517f7b000.zip
Minor cleanups to [8fbda563d2f5].
FossilOrigin-Name: 5ee2594b657b96aea9e482a175820dcbacfa9298da45b38cf17f39ad076d3f7f
Diffstat (limited to 'ext/wasm/tester1.c-pp.js')
-rw-r--r--ext/wasm/tester1.c-pp.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/wasm/tester1.c-pp.js b/ext/wasm/tester1.c-pp.js
index e78897bed..fe5bdc837 100644
--- a/ext/wasm/tester1.c-pp.js
+++ b/ext/wasm/tester1.c-pp.js
@@ -2613,10 +2613,16 @@ globalThis.sqlite3InitModule = sqlite3InitModule;
test: function(sqlite3){
this.kvvfsUnlink();
let db;
+ const encOpt1 = 1
+ ? {textkey: 'foo'}
+ : {key: 'foo'};
+ const encOpt2 = encOpt1.textkey
+ ? encOpt1
+ : {hexkey: new Uint8Array([0x66,0x6f,0x6f]/*==>"foo"*/)}
try{
db = new this.JDb({
filename: this.kvvfsDbFile,
- key: 'foo'
+ ...encOpt1
});
db.exec([
"create table t(a,b);",
@@ -2643,7 +2649,7 @@ globalThis.sqlite3InitModule = sqlite3InitModule;
db = new sqlite3.oo1.DB({
filename: this.kvvfsDbFile,
vfs: 'kvvfs',
- hexkey: new Uint8Array([0x66,0x6f,0x6f]) // equivalent: '666f6f'
+ ...encOpt2
});
T.assert( 4===db.selectValue('select sum(a) from t') );
}finally{