Cerbero.Catalog (cerbero v0.1.0)

Copy Markdown View Source

The queryable in-memory model the checks run against. Row-estimate policy: max(reltuples, n_live_tup) when reltuples >= 0, else n_live_tup; partitioned parents are the sum of their partitions, never the parent row; unknown scale is unbounded, never small.

Summary

Types

t()

@type t() :: %Cerbero.Catalog{
  backfilled: term(),
  born: term(),
  collected_at: term(),
  engine: term(),
  multiplier: term(),
  partitions: term(),
  scale_mode: term(),
  source: term(),
  standby: term(),
  stats_provenance: term(),
  stats_reset: term(),
  tables: term(),
  version_num: term()
}

Functions

apply(cat, arg2)

@spec apply(
  t(),
  struct()
) :: t()

apply_migration(cat, migration)

@spec apply_migration(t(), Cerbero.Migration.t()) :: t()

backfilled?(catalog, name)

@spec backfilled?(t(), String.t()) :: boolean()

born?(catalog, name)

@spec born?(t(), String.t()) :: boolean()

born_empty?(cat, name)

@spec born_empty?(t(), String.t()) :: boolean()

Created by the pending set and never backfilled — still empty by construction, safe to silence.

column(cat, table_name, column_name)

@spec column(t(), String.t(), String.t()) :: map() | nil

empty(engine \\ :postgres, version_num \\ 150_000)

@spec empty(:postgres | :cockroachdb, integer()) :: t()

from_snapshot(s, staleness)

@spec from_snapshot(Cerbero.Snapshot.t(), Cerbero.Snapshot.Staleness.t()) :: t()

has_index_leading_on?(cat, table_name, column_name)

@spec has_index_leading_on?(t(), String.t(), String.t()) :: boolean()

known?(cat, name)

@spec known?(t(), String.t()) :: boolean()

qualify(name)

@spec qualify(String.t()) :: String.t()

scale(cat, name)

@spec scale(t(), String.t()) ::
  {:rows, non_neg_integer(), non_neg_integer()} | :zero | :unknown

table(catalog, name)

@spec table(t(), String.t()) :: Cerbero.Snapshot.Table.t() | nil

traffic(cat, name, config)

@spec traffic(t(), String.t(), Cerbero.Config.t()) :: :hot | :cold | :unknown

validated_not_null_check?(cat, table_name, column_name)

@spec validated_not_null_check?(t(), String.t(), String.t()) :: boolean()