primary_key_name
Poll
Inherits Avram::PrimaryKeyMethods < DB::Mappable < DB::Serializable < LuckyCache::Cachable < BaseModel < DB::Mappable < DB::Serializable < LuckyCache::Cachable < Avram::Model < Avram::SchemaEnforcer < Avram::Polymorphic < Avram::Associations < Avram::Associations::BelongsTo < Avram::Associations::HasOne < Avram::Associations::HasMany < Reference < Object
Constants
ASSOCIATIONS = [{type: Event, assoc_name: event, foreign_key: :event_id,
relationship_type: :belongs_to,
through: nil, base_query_class: nil}, {type: PollOption, assoc_name: poll_options, foreign_key: :poll_id,
relationship_type: :has_many, through: nil,
base_query_class: PollOption::BaseQuery}, {type: PollVote, assoc_name: poll_votes, foreign_key: :poll_id,
relationship_type: :has_many, through: nil,
base_query_class: PollVote::BaseQuery}] of Nil
COLUMNS = [{name: id, type: Int64, 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: updated_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: question, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: is_locked, type: Bool, nilable: false, autogenerated: false, value: false,
serialized: false, allow_blank: false}, {name: event_id, type: Event::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = Int64
Constructors
new(rs : DB::ResultSet)
Class methods
column_names
columns
ensure_correct_column_mappings!
from_rs(rs : DB::ResultSet)
schema_enforcer_validations
table_name
Instance methods
base_query_class
This makes it easy for plugins and extensions to use the base SaveOperation
created_at
delete_operation_class
event
event!
event_count
event_id
event_preloaded?
Returns true if the association has been preloaded
event_query
id
is_locked
is_locked?
poll_options
poll_options!
poll_options_count
poll_options_preloaded?
poll_options_query
poll_votes
poll_votes!
poll_votes_count
poll_votes_preloaded?
poll_votes_query
question
save_operation_class
total_votes
Sourceupdated_at