aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-oo1.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-08-24 18:39:46 +0000
committerstephan <stephan@noemail.net>2022-08-24 18:39:46 +0000
commit3734401a95dc92f7cb7c3a86875370f1598213aa (patch)
tree19f2fb6f3a4aded3bf4a161139be448b02250cfa /ext/wasm/api/sqlite3-api-oo1.js
parent9c765e7945bfe79ac724e8eaf9103914f0557271 (diff)
downloadsqlite-3734401a95dc92f7cb7c3a86875370f1598213aa.tar.gz
sqlite-3734401a95dc92f7cb7c3a86875370f1598213aa.zip
Expand the worker1 'exec' op handling for per-row callbacks for API-level consistency and smooth some edges between worker1 core and worker1-promiser. Add worker1 'config-get' message to fetch the serializable parts of the sqlite3.config state. Improve the 'open' op's handling of the 'persistent' option (noting that we cannot yet test that case from a worker).
FossilOrigin-Name: 509f8839201ec1ea4863bd31493e6c29a0721ca6340755bb96656b828758fea7
Diffstat (limited to 'ext/wasm/api/sqlite3-api-oo1.js')
-rw-r--r--ext/wasm/api/sqlite3-api-oo1.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-api-oo1.js b/ext/wasm/api/sqlite3-api-oo1.js
index be9d8af5a..e16b45bb5 100644
--- a/ext/wasm/api/sqlite3-api-oo1.js
+++ b/ext/wasm/api/sqlite3-api-oo1.js
@@ -252,6 +252,21 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
out.cbArg = (stmt)=>stmt.get(out.opt.rowMode);
break;
}
+ /*
+ TODO?: how can we define rowMode such that it uses
+ rowMode of 'object' and returns a given named field from
+ the object. Something like:
+
+ if(?what goes here?){
+ out.cbArg = function f(stmt){return stmt.get(this.obj)[this.colName]}
+ .bind({obj:{}, colName: ???what goes here???}});
+ break;
+ }
+
+ Maybe rowMode:['colName1',... 'colNameN']? That could be
+ ambiguous: might mean "return an object with just these
+ columns".
+ */
toss3("Invalid rowMode:",out.opt.rowMode);
}
}