Replicant.Decoder.OidDatabase (Replicant v1.0.0)

Copy Markdown View Source

Maps a numeric PostgreSQL type ID to a descriptive string.

Implementation borrowed from Supabase Realtime, Cainophile, and epgsql.

Summary

Functions

Maps a numeric PostgreSQL type ID to a descriptive string.

Functions

name_for_type_id(type_id)

@spec name_for_type_id(non_neg_integer()) :: String.t() | non_neg_integer()

Maps a numeric PostgreSQL type ID to a descriptive string.

Examples

iex> name_for_type_id(1700)
"numeric"

iex> name_for_type_id(25)
"text"

iex> name_for_type_id(3802)
"jsonb"