Mediate.Postgres.Version (mediate_postgres v0.1.0)

Copy Markdown View Source

The policy version of row-level security: the migration number.

A migration that changes a policy appends its own version in the same transaction as its DDL. So the rules and the record of what they became commit together or not at all, and a decision after it names that number. the events document under "Policy version" has the event and what it carries.

The content is the policies as pg_policy renders them. A version carries it by value under the cap the caller gives, and as a pointer to the tables above it. The content hash is the SHA-256 of that text either way.

Summary

Functions

The version a migration publishes, from the policies it read back. Requires version:, author:, approval:, at:, and content_bytes:.

Emit the version once per call, and answer the version it emitted.

The telemetry event publish/1 emits, once per call.

Functions

of(adapter, policies, options)

The version a migration publishes, from the policies it read back. Requires version:, author:, approval:, at:, and content_bytes:.

publish(version)

@spec publish(Mediate.PolicyVersion.t()) :: {:ok, Mediate.PolicyVersion.t()}

Emit the version once per call, and answer the version it emitted.

telemetry_event()

@spec telemetry_event() :: [atom()]

The telemetry event publish/1 emits, once per call.