Public
Edited
Feb 14, 2023
Insert cell
Insert cell
sqliteWasm = import("https://esm.sh/@vlcn.io/wa-crsqlite")
Insert cell
sqlite = sqliteWasm.default(
(file) => "https://esm.sh/@vlcn.io/wa-crsqlite/dist/wa-sqlite-async.wasm"
)
Insert cell
db = sqlite.open(":memory:")
Insert cell
created = db.execMany([
`CREATE TABLE IF NOT EXISTS todo_list ("name" primary key, "creation_time");`,
`CREATE TABLE IF NOT EXISTS todo ("id" primary key, "list", "text", "complete");`
// primary keys act as the identifier by which to merge.
// if two things have different primary keys, they'll both exist.
// if two things have the same primary key, their contents are merged.
])
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more