def self.primary_key_name : Symbol | Nil
#
class SpecimenLabel
- SpecimenLabel
- BaseModel
- Avram::Model
- Reference
- Object
Included Modules
- Avram::PrimaryKeyMethods
- DB::Mappable
- DB::Serializable
- LuckyCache::Cachable
Defined in:
models/specimen_label.crConstant Summary
-
ASSOCIATIONS =
[{type: SpecimenLabelLabelSpecimen, assoc_name: label_specimens, foreign_key: :specimen_label_id, relationship_type: :has_many, through: nil, base_query_class: SpecimenLabelLabelSpecimen::BaseQuery}] of Nil
-
COLUMNS =
[{name: id, type: UUID, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: created_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: user_id, type: Int32, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: name, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}] of Nil
-
PRIMARY_KEY_NAME =
:id
-
PRIMARY_KEY_TYPE =
UUID
Constructors
Class Method Summary
- .column_names : Array(Symbol)
- .columns : Array(NamedTuple(name: Symbol, nilable: Bool, type: String))
- .ensure_correct_column_mappings!
- .from_rs(rs : DB::ResultSet)
- .primary_key_name : Symbol | Nil
- .schema_enforcer_validations
- .table_name : String
Macro Summary
Instance Method Summary
- #_preloaded_label_specimens=(vals : Array(SpecimenLabelLabelSpecimen)) : Array(SpecimenLabelLabelSpecimen)
-
#base_query_class : ::SpecimenLabel::BaseQuery.class
This makes it easy for plugins and extensions to use the base SaveOperation
- #created_at : Time
- #delete_operation_class : ::SpecimenLabel::DeleteOperation.class
- #id : UUID
- #label_specimens : Array(SpecimenLabelLabelSpecimen)
- #label_specimens! : Array(SpecimenLabelLabelSpecimen)
- #label_specimens_count : Int64
- #label_specimens_preloaded? : Bool
- #label_specimens_query
- #name : String
- #save_operation_class : ::SpecimenLabel::SaveOperation.class
- #user_id : Int32 | Nil
Constructor methods inherited from class BaseModel
new(rs : DB::ResultSet)
new
Class methods inherited from class BaseModel
database : Avram::Database.class
database,
from_rs(rs : DB::ResultSet)
from_rs
Macros inherited from class BaseModel
default_columns
default_columns
Constructor Detail
Class Method Detail
Macro Detail
Instance Method Detail
def _preloaded_label_specimens=(vals : Array(SpecimenLabelLabelSpecimen)) : Array(SpecimenLabelLabelSpecimen)
#
This makes it easy for plugins and extensions to use the base SaveOperation