There is no commit for transactions? (No way to DELETE rows / etc?)

Offen
#536 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
javascript, sqlite, wasm
Bereich
database

Rechercherichtung

Begin at the initSqlJs() callback and inspect the db.exec(query), db.getRowsModified(query), and db.close() flow shown in the report. Determine how a DELETE is retained or persisted after execution, and whether the expected save or reload path is documented. Done means the behavior is clarified or a reproducible transaction/persistence fix is identified.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Hi -- I'm attempting to DELETE a row in a simple query, however I can't db.commit(query); because it doesn't exist with sql.js seemingly? It takes the query just fine but obviously it's never committed for the changes.

Any ideas / work arounds used by other people?

Thanks

    initSqlJs().then(function (SQL) {
      const db = new SQL.Database(dbFile);
      const res = db.exec(query);
      const modified = db.getRowsModified(query);
      // db.commit(query); This doesn't exist...

      console.log(res); // shows a blank array []
      console.log(modified); // Shows the amount of "modified" rows

      resolve(res);
      db.close();
    });
Vorherrschende Sprache
JavaScript
Sterne
13.7k
Forks
1.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Beitragsleitfaden öffnen

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 sql-js/sql.js

Alle Issues in sql-js/sql.js

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

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