CARVIEW |
Select Language
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
last-modified: Fri, 23 Feb 2024 17:40:52 GMT
access-control-allow-origin: *
etag: W/"65d8d8a4-1be3"
expires: Sat, 11 Oct 2025 07:09:58 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 5A51:C7931:48648:5CFFB:68EA006C
accept-ranges: bytes
age: 0
date: Sat, 11 Oct 2025 06:59:58 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210075-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760165998.871710,VS0,VE311
vary: Accept-Encoding
x-fastly-request-id: b9f76b4045454e7d6316bcd1f7f0aa56dd40a6f8
content-length: 2141
PostgreSQL with PGlite | Observable Framework Experiments
PostgreSQL with PGlite
const sql = view(Inputs.textarea({value: "select 'Hello world'", label: "SQL"}))
Query result
How this works
import { PGlite } from "npm:@electric-sql/pglite@0.0.1-alpha.2/dist/index.min.js";
const db = new PGlite()
// Pass 'idb://my-pgdata' for indexedDB persistence
const response = await db.query(sql)