Get primary key column indices for a table.
Fetches and parses SpacetimeDB module schema.
The schema describes tables (columns, types, primary keys), reducers (params), and the typespace (algebraic type definitions). Used by the ClientCache to decode BSATN row data into Elixir maps.
Summary
Functions
Get column definitions for a table.
Fetch and parse schema from a SpacetimeDB instance.
Parse a raw schema JSON map into a structured Schema.
Get primary key column indices for a table.
Types
@type algebraic_type() :: :bool | :u8 | :i8 | :u16 | :i16 | :u32 | :i32 | :u64 | :i64 | :u128 | :i128 | :u256 | :i256 | :f32 | :f64 | :string | :bytes | {:array, algebraic_type()} | {:option, algebraic_type()} | {:product, [column()]} | {:ref, non_neg_integer()}
@type column() :: %{name: String.t(), type: algebraic_type()}
@type t() :: %Spacetimedbex.Schema{ reducers: %{required(String.t()) => reducer_def()}, tables: %{required(String.t()) => table_def()}, typespace: [term()] }
@type table_def() :: %{ name: String.t(), columns: [column()], primary_key: [non_neg_integer()] }