Skip to content
FutureBlitz

    Install

    Import std.db.database

    Transaction

    std.db.database

    class

    Public Class Transaction

    What Database.Begin gives. What the Database does from then on is kept when it commits, and undone when it rolls back, or when it's let go of without a Commit, as when an error leaves the code that holds it, so a transaction that fails leaves nothing. One begun while another was open is a part of that one: its Commit keeps what it did only as far as that one does, and that one's Rollback undoes it too.

    std/db/database.fb, line 1425

    • Public Property IsOpen: Bool property #

      Whether it's open: not committed or rolled back, by its own Methods, with the Transaction it's a part of, or by SQLite, as some errors do.

    • @PanicsAtCaller Public Method Commit() Throws DatabaseError method #

      Keeps what it did. Throws a DatabaseError when SQLite can't, and it stays open, as when another connection is reading the database, or when it isn't open. Panics after its Commit or Rollback, or while a Transaction begun inside it is open.

    • @PanicsAtCaller Public Method Rollback() Throws DatabaseError method #

      Undoes what it did, and what each Transaction begun inside it did, or nothing when it isn't open. Panics after its Commit or Rollback.

    Report an issue with this page or with FutureBlitz on GitHub.