abstract class Avram::Model
- Avram::Model
- Reference
- Object
Included Modules
Defined in:
avram/model.crClass Method Summary
Instance Method Summary
-
#delete
Refer to
PrimaryKeyMethods#delete
- #model_name
-
#reload : self
Refer to
PrimaryKeyMethods#reload
-
#reload(&) : self
Refer to
PrimaryKeyMethods#reload
-
#to_param : String
Refer to
PrimaryKeyMethods#to_param
Macro Summary
- association(assoc_name, type, relationship_type, foreign_key = nil, through = nil)
- column(type_declaration, autogenerated = false, serialize is_serialized = false, allow_blank = false)
- default_columns
- primary_key(type_declaration)
- setup(step)
- setup_association_queries(associations, *args, **named_args)
- setup_column_info_methods(columns, *args, **named_args)
-
setup_db_mapping(columns, *args, **named_args)
Setup database mapping for the model's columns.
- setup_getters(columns, *args, **named_args)
- setup_initialize(columns, *args, **named_args)
- setup_table_schema_enforcer_validations(type, *args, **named_args)
- setup_view_schema_enforcer_validations(type, *args, **named_args)
- skip_default_columns
- table(table_name = nil)
- timestamps
- validate_columns(model_type)
- validate_primary_key
- view(view_name = nil)
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
Instance Method Detail
Macro Detail
macro column(type_declaration, autogenerated = false, serialize is_serialized = false, allow_blank = false)
#
macro setup_db_mapping(columns, *args, **named_args)
#
Setup database mapping for the model's columns.
NOTE Avram::Migrator saves Float
columns as numeric which are converted
in the avram/charms/float64_extensions.cr file