class

Ralph::Schema::ModelSchemaExtractor

Inherits Reference / Object

Extracts schema from a model class

Constants

TYPE_MAP = {"Int64" => :bigint, "Int32" => :integer, "Int16" => :smallint, "String" => :string, "Bool" => :boolean, "Float64" => :float, "Float32" => :float, "Time" => :timestamp, "JSON::Any" => :jsonb, "Bytes" => :binary, "UUID" => :uuid}

Map Crystal types to SQL symbols used in migrations

Class methods

extract(model_class : Ralph::Model.class) : ModelSchema
Source
extract_all
Source
polymorphic_fk_columns(model_class : Ralph::Model.class) : Set(String)

Get the set of polymorphic FK column names for a model

Source