Duckdbwasm Vitebrowser
Barebones example of querying with duckdb-wasm using Vite and just the browser (no front-end framework). No dataset file is loaded; the data is created using the generate_series function.
Install / Use
npx skills add duckdb-wasm-examples/duckdbwasm-vitebrowserInstalls into whichever agent you are using.
README
duckdb-wasm example: vite-browser
Barebones example of querying with duckdb-wasm using Vite and just the browser (no front-end framework). No dataset file is loaded; the data is created using the generate_series function.
How to run
- Install the dependencies using
npm i - Run the example using
npm run preview - (Optional) If forking, use
npm run devand go from there!
Steps taken
Everything runs from the main.js script which roughly does the following:
- Import: duckdb-wasm and all its bundle alternatives
- Pick bundle: Choose based on the browser in-use
- Instantiate: Start duckdb and create a connection
- Query: Select from the "database" (generate_series) using a basic query or a prepared statement
- Close: The connection, database, and worker.
Notes:
- For ease of use when showing the results, JSON copies of the query results are printed to the console. Consequently...
- ...this example is not acquainted with proper usage of the Apache Arrow objects like Table.
- Making JSON copies of large query results for console.log may not be advisable
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
