CARVIEW |
Finding the SQLite version used by Web SQL in Chrome
Google Chrome still includes support for Web SQL, the long since abandoned proposed standard for shipping a SQL engine in browser JavaScript. I was reminded of its existence today while reading about the new official sqlite3 wasm build.
Out of curiosity, I decided to see what version of SQLite was bundled with Chrome. I assumed it would be a very old version, since Web SQL is an idea from a long time ago now.
I used GitHub Copilot to write the code, so I wouldn't have to look up the APIs myself. I typed these two comments:
// Instantiate a new WebSQL database
...
// Execute a SQL query returning sqlite_version()
Copilot completed the following:
// Instantiate a new WebSQL database
var db = openDatabase('mydb', '1.0', 'Test DB', 2 * 1024 * 1024);
// Execute a SQL query returning sqlite_version()
db.transaction(function (tx) {
tx.executeSql(
'SELECT sqlite_version()',
[],
function (tx, results) {
console.log(results.rows.item(0));
}
);
});
I pasted that into my Chrome DevTools console... and got the following result:
{sqlite_version(): '3.39.4'}
This surprised my greatly, because SQLite 3.39.4 is the most recent release, and only came out a month ago on the 29th of September 2022!
I had a look on GitHub and found this commit from the 30th of September which bumps the version of SQLite included in Chromium.
My Chrome is version 107.0.5304.62 - I found the SQLite 3.39.4 upgrade mentioned in this log of commits between v106 and v107, which was linked to from this release post.
Related
- python Using the sqlite3 Python module in Pyodide - Python WebAssembly - 2021-10-18
- homebrew Running the latest SQLite in Datasette using Homebrew - 2022-02-28
- sqlite Trying out cr-sqlite on macOS - 2023-09-12
- sqlite Trying out SQLite extensions on macOS - 2022-08-03
- sqlite Calculating the size of a SQLite database file using SQL - 2023-08-21
- sqlite Building a specific version of SQLite with pysqlite on macOS/Linux - 2021-08-14
- sqlite A one-liner to output details of the current Python's SQLite - 2023-08-19
- sqlite The SQLite now argument is stable within the same query - 2023-02-05
- mediawiki How to run MediaWiki with SQLite on a macOS laptop - 2021-03-06
- sqlite Compile and run a new SQLite version with the existing sqlite3 Python library on macOS - 2023-08-22
Created 2022-10-28T15:57:35-07:00 · Edit