class Taxon

Included Modules

Defined in:

models/taxon.cr

Constant Summary

ASSOCIATIONS = [] 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: kingdom, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: phylum, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: class_name, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: order, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: suborder, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: family, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: subfamily, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: tribe, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: subtribe, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: genus, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: subgenus, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: species, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: subspecies, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: scientific_name_author, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: name_publishedin_year, type: Int32, nilable: false, autogenerated: false, value: 0, serialized: false, allow_blank: true}, {name: change_genus_brackets, type: Bool, nilable: false, autogenerated: false, value: false, serialized: false, allow_blank: false}, {name: unknown_author_brackets, type: Bool, nilable: false, autogenerated: false, value: false, serialized: false, allow_blank: false}, {name: unknown_name_publishedin_year_brackets, type: Bool, nilable: false, autogenerated: false, value: false, serialized: false, allow_blank: false}, {name: actual_dist_year, type: Int32, nilable: false, autogenerated: false, value: 0, serialized: false, allow_blank: false}, {name: japanese_name, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: distribution, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: note, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: image1, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: image2, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: image3, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: image4, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: image5, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = UUID

Constructors

Class Method Summary

Macro Summary

Instance Method Summary

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

def self.new(id : UUID, created_at : Time, kingdom : String, phylum : String, class_name : String, order : String, suborder : String, family : String, subfamily : String, tribe : String, subtribe : String, genus : String, subgenus : String, species : String, subspecies : String, scientific_name_author : String, name_publishedin_year : Int32, change_genus_brackets : Bool, unknown_author_brackets : Bool, unknown_name_publishedin_year_brackets : Bool, actual_dist_year : Int32, japanese_name : String, distribution : String, note : String, image1 : Nil | String, image2 : Nil | String, image3 : Nil | String, image4 : Nil | String, image5 : Nil | String) #

def self.new(rs : DB::ResultSet) #

Class Method Detail

def self.column_names : Array(Symbol) #

def self.columns : Array(NamedTuple(name: Symbol, nilable: Bool, type: String)) #

def self.ensure_correct_column_mappings! #

def self.from_rs(rs : DB::ResultSet) #

def self.primary_key_name : Symbol | Nil #

[View source]
def self.schema_enforcer_validations #

def self.table_name : String #

Macro Detail

macro default_columns #

[View source]

Instance Method Detail

def actual_dist_year : Int32 #

def base_query_class : ::Taxon::BaseQuery.class #

This makes it easy for plugins and extensions to use the base SaveOperation


def change_genus_brackets : Bool #

def change_genus_brackets? : Bool #

def class_name : String #

def created_at : Time #

def delete_operation_class : ::Taxon::DeleteOperation.class #

def distribution : String #

def family : String #

def genus : String #

def id : UUID #

def image1 : String | Nil #

def image2 : String | Nil #

def image3 : String | Nil #

def image4 : String | Nil #

def image5 : String | Nil #

def japanese_name : String #

def kingdom : String #

def name_publishedin_year : Int32 #

def note : String #

def order : String #

def phylum : String #

def save_operation_class : ::Taxon::SaveOperation.class #

def scientific_name_author : String #

def species : String #

def subfamily : String #

def subgenus : String #

def suborder : String #

def subspecies : String #

def subtribe : String #

def tribe : String #

def unknown_author_brackets : Bool #

def unknown_author_brackets? : Bool #

def unknown_name_publishedin_year_brackets : Bool #

def unknown_name_publishedin_year_brackets? : Bool #