GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mandolyte/sqlitenext

BranchesTags
Open more actions menu

Latest commit

 

History

38 Commits
38 Commits

Folders and files

NameName
Last commit message
Last commit date
context
context
 
 
import_dump
import_dump
 
 
in-mem-main-thread
in-mem-main-thread
 
 
load_db
load_db
 
 
opfs_db
opfs_db
 
 
opfs_fetch_db
opfs_fetch_db
 
 
textbox
textbox
 
 
worker
worker
 
 
README.md
README.md
 
 

Repository files navigation

Sqlite3 with Next.js

I have moved some things around in order to have multiple experiments and examples in the same repo.

Each folder is described below.

in-mem-main-thread

This shows an example of using an in-memory database. It runs on the main thread and might be used within hooks as any such database connection might be.

There is a README with more details.

worker

Uses web workers to handle all interactions with the database (still in-memory). Worker interactions use a pub/sub approach. See README for details.

textbox

Built from "worker", this example, a text box is available to enter SQL or DML. The README has some things to copy/paste or make up your own!

context

Built from textbox, this example moves important aspects to the an application context, making the database easily available to all parts of the application.

import_dump

The demo loads a table using a dump file from sqlite3 CLI. It runs way too slow. See readme for more. And the "load_db" demo below.

load_db

This demo shows loading a database table with almost 99k rows by using a transaction and binding parameters to the inserts. This loaded in about 6s. Much better than the import_dump demo.

opfs_db

Created from load_db above. I had to tweak the nextjs config to add the headers required by OPFS. This did not work until I found this article: vercel/next.js#17991 which shows how to apply the headers to all pages.

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

17 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.