aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-oo1.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-10-26 11:27:33 +0000
committerstephan <stephan@noemail.net>2022-10-26 11:27:33 +0000
commit34b92b19f3443c60669cd8a4d3239c9b9f84d3f0 (patch)
tree94594ba9de6a2c6f762ed4f43a371e6ff019d163 /ext/wasm/api/sqlite3-api-oo1.js
parent14ae1a533160e0510f33e408b4f17c66f71e2bd7 (diff)
downloadsqlite-34b92b19f3443c60669cd8a4d3239c9b9f84d3f0.tar.gz
sqlite-34b92b19f3443c60669cd8a4d3239c9b9f84d3f0.zip
Replace the newly-removed oo1.DB.getFilename() with DB.dbFilename() with the hope that the distinction from the dbInstance.filename property is clearer.
FossilOrigin-Name: 0b80543d75504c733b73b32f73b96074a4b0cebad64e47032926a3fefee41726
Diffstat (limited to 'ext/wasm/api/sqlite3-api-oo1.js')
-rw-r--r--ext/wasm/api/sqlite3-api-oo1.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-api-oo1.js b/ext/wasm/api/sqlite3-api-oo1.js
index 05fc40371..0a6b48b6e 100644
--- a/ext/wasm/api/sqlite3-api-oo1.js
+++ b/ext/wasm/api/sqlite3-api-oo1.js
@@ -515,6 +515,15 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
}
},
/**
+ Similar to the this.filename but returns the
+ sqlite3_db_filename() value for the given database name,
+ defaulting to "main". The argument may be either a JS string
+ or a pointer to a WASM-allocated C-string.
+ */
+ dbFilename: function(dbName='main'){
+ return capi.sqlite3_db_filename(affirmDbOpen(this).pointer, dbName);
+ },
+ /**
Returns the name of the given 0-based db number, as documented
for sqlite3_db_name().
*/