Parameter Make.D

type conn
val run : conn -> ('p, 'r) Rowtype.statement -> 'p -> ('r, [> Rowtype.error ]) Stdlib.result
val exec_raw : conn -> string -> (unit, [> Rowtype.error ]) Stdlib.result
val within : conn -> (conn -> ('a, [> transaction_failure ] as 'e) Stdlib.result) -> ('a, 'e) Stdlib.result

One transaction, which takes the write lock as it begins where the dialect lets it choose.

val exclusively : conn -> (holding: (conn -> (unit, [ `Lock of [ `Lost ] | Rowtype.error ]) Stdlib.result) -> (unit, error) Stdlib.result) -> (unit, error) Stdlib.result

The run, under whatever lock the dialect takes over all of it, and holding, asked at the start of each migration's transaction, which says whether the run still holds it.

val prepare_record : table:string -> conn -> (unit, [> Rowtype.error ]) Stdlib.result

The record's table made, and one made before brought up to it.

val record_columns : table:string -> conn -> (record_columns, [> Rowtype.error ]) Stdlib.result

Read, and nothing written.

type mark
val mark : conn -> (mark, [> Rowtype.error ]) Stdlib.result

Inside a migration's transaction, before its file runs.

val unbroken : conn -> mark -> (bool, [> Rowtype.error ]) Stdlib.result

After the file ran: whether the transaction mark was taken in is still the one open, which a file that ended it -- a commit, a rollback -- makes false.

val reset : conn -> (unit, [> Rowtype.error ]) Stdlib.result

What a migration may set for its session put back, after each.