Drop postgres requirement for easier adoption

Offen
#203 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
bun, postgresql, sqlite, typescript
Bereich
database

Rechercherichtung

Start with the existing Postgres adapter and the storageContract tests, then review how Bun's SQL handles SQLite transactions. Add a SQLite storage adapter for single-user use and ensure concurrent transactions are handled one at a time. Done means the adapter passes storageContract alongside the existing adapters.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement triage/human-response

Awesome project! While it's in early stages I think this project is most likely to be used single player. With that said making a sqlite adapter I think would be worthwhile.

here's a rough plan from claude

Add a SQLite storage adapter for single-user local use. It seems to fit
the current design:

  • One process already owns writes (the writer lease plus the global advisory
    lock), which is SQLite's normal mode.
  • The Postgres adapter uses Bun's SQL, which also accepts sqlite:// URLs.
    RETURNING, ON CONFLICT, JSON functions and BLOBs work there.
  • storageContract already runs against two adapters, so a third could be
    proven against it.

The main gotcha: Bun's SQLite mode doesn't queue concurrent sql.begin()
calls, so the adapter would need to run transactions one at a time. With a
simple promise queue, 20 concurrent transactions all succeeded; without it,
19 failed.

Vorherrschende Sprache
TypeScript
Sterne
591
Forks
33
Ø Merge
4 Std. 15 Min.
Gemergte PRs (30 T.)
409

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus githubnext/chopin

Alle Issues in githubnext/chopin

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.