abstract class Avram::Model

Included Modules

Defined in:

avram/model.cr

Class Method Summary

Instance Method Summary

Macro Summary

Class methods inherited from module Avram::SchemaEnforcer

ensure_correct_column_mappings! ensure_correct_column_mappings!

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]

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]

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]