7 Matching Annotations
  1. Apr 2022
    1. Will be executed right after outermost transaction have been successfully committed and data become available to other DBMS clients.

      Very good, pithy summary. Worth 100 words.

      The first half was good enough. But the addition of "and data become available to other DBMS clients" makes it real-world and makes it clear why it (the first part) even matters.

    2. after_commit { puts "We're all done!" }

      Notice the order: this is printed last, after the outer (real) transaction is committed, not when the inner "transaction" block finishes without error.

    1. These callbacks are smart enough to run after the final (outer) transaction* is committed. * Usually, there is one real transaction and nested transactions are implemented through savepoints (see, for example, PostgreSQL).

      important qualification: the outer transaction, the (only) real transaction

  2. Jun 2021
  3. Apr 2021
  4. Feb 2021