View Source Electric.Schema (electric v1.0.1)

Summary

Functions

Convert column information into a schema map

Types

@type column_name() :: String.t()
@type schema() :: %{
  :type => type_name(),
  optional(:dims) => non_neg_integer(),
  optional(:pk_index) => non_neg_integer(),
  optional(:max_length) => String.t(),
  optional(:length) => String.t(),
  optional(:precision) => String.t(),
  optional(:scale) => String.t(),
  optional(:fields) => String.t(),
  optional(:type_mod) => integer()
}
@type type_name() :: String.t()

Functions

Link to this function

from_column_info(column_info, included_columns \\ nil)

View Source
@spec from_column_info(
  Electric.Postgres.Inspector.column_info(),
  [String.t(), ...] | nil
) :: %{
  required(column_name()) => schema()
}

Convert column information into a schema map