abstract class Avram::Model

Included Modules

Defined in:

avram/model.cr

Class Method Summary

Macro Summary

Instance Method Summary

Class methods inherited from module Avram::SchemaEnforcer

ensure_correct_column_mappings! ensure_correct_column_mappings!

Macros inherited from module Avram::SchemaEnforcer

setup(type, *args, **named_args) setup, skip_schema_enforcer skip_schema_enforcer

Macros inherited from module Avram::Polymorphic

polymorphic(polymorphic_name, associations, optional = false) polymorphic

Macros inherited from module Avram::Associations::BelongsTo

belongs_to(type_declaration, foreign_key = nil) belongs_to

Macros inherited from module Avram::Associations::HasOne

has_one(type_declaration, foreign_key = nil) has_one

Macros inherited from module Avram::Associations::HasMany

has_many(type_declaration, through = nil, foreign_key = nil, base_query_class = nil) has_many

Instance methods inherited from class Object

blank_for_validates_required? : Bool blank_for_validates_required?

Class Method Detail

def self.database_table_info : Avram::Database::TableInfo | Nil #

[View source]
def self.primary_key_name : Symbol | Nil #

[View source]

Macro Detail

macro association(assoc_name, type, relationship_type, foreign_key = nil, through = nil, base_query_class = nil) #

[View source]
macro column(type_declaration, autogenerated = false, serialize is_serialized = false, allow_blank = false, converter = nil) #

[View source]
macro default_columns #

[View source]
macro primary_key(type_declaration) #

[View source]
macro setup(step, *args, **named_args) #

[View source]
macro setup_association_queries(associations, *args, **named_args) #

[View source]
macro setup_column_info_methods(columns, *args, **named_args) #

[View source]
macro setup_getters(columns, *args, **named_args) #

[View source]
macro setup_initialize(columns, *args, **named_args) #

[View source]
macro setup_table_schema_enforcer_validations(type, *args, **named_args) #

[View source]
macro setup_view_schema_enforcer_validations(type, *args, **named_args) #

[View source]
macro skip_default_columns #

[View source]
macro table(table_name = nil) #

[View source]
macro timestamps #

[View source]
macro validate_columns(model_type) #

[View source]
macro validate_primary_key #

[View source]
macro view(view_name = nil, materialized = false) #

[View source]

Instance Method Detail

def delete #

[View source]
def model_name : String #

[View source]
def reload : self #

[View source]
def reload(&) : self #

[View source]
def to_param : String #

[View source]