journal_t Derived Type

type, public :: journal_t


Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: path

<db>/_journal.dat, set at db_open

integer, public :: unit = -1

Open stream unit, -1 if not open

logical, public :: active = .false.

A transaction is in flight

logical, public :: explicit = .false.

The in-flight txn was opened by db_begin (vs. auto-commit)

logical, public :: armed = .false.

Undo records are durable (journal is hot)

logical, public :: sized = .false.

File created + pre-sized this session

integer(kind=int64), public :: capacity = 0

Pre-allocated size in bytes

integer, public :: nrec = 0

Live undo-record count for the current txn

type(undo_rec_t), public, allocatable :: recs(:)

In-memory undo set for the current txn

type(tbl_snap_t), public, allocatable :: snaps(:)

Per-table counter snapshot, by table position, for the current txn