readTransactionality

fun readTransactionality(content: String, origin: String): Boolean

Whether content wants a transaction, which is everything except a file that said otherwise.

A directive is a comment in the file's header - before the first line that is neither blank nor a comment - shaped -- octavius:no-transaction. Spacing and case are free; the name is not. A directive nobody knows is refused rather than ignored, because a typo in no-transaction that passed silently would put a CREATE INDEX CONCURRENTLY inside a transaction and the server would refuse it there.

A directive below the header is refused too: one buried at line four hundred, changing how the whole file runs, is not something a reader should have to go looking for.

Throws

INVALID_MIGRATION for a directive that is unknown or out of place.