class SaveCollectionSetting

Overview

コレクション設定の保存オペレーション

Defined in:

operations/save_collection_setting.cr

Constant Summary

ATTRIBUTES = [] of Nil
COLUMN_ATTRIBUTES = [{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: collection_name, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: institution_code, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: latest_collection_code, type: Int32, nilable: false, autogenerated: false, value: 0, serialized: false, allow_blank: false}, {name: note, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {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: collection_name, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: institution_code, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: latest_collection_code, type: Int32, nilable: false, autogenerated: false, value: 0, serialized: false, allow_blank: false}, {name: note, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}] of Nil
FOREIGN_KEY = "collection_setting_id"

コレクション設定の保存オペレーション

OPERATION_NEEDS = [] of Nil

Constructors

Class Method Summary

Macro Summary

Instance Method Summary

Instance methods inherited from class CollectionSetting::SaveOperation

attributes attributes, collection_name collection_name, collection_name=(_value) collection_name=, created_at created_at, created_at=(_value) created_at=, id id, id=(_value) id=, institution_code institution_code, institution_code=(_value) institution_code=, latest_collection_code latest_collection_code, latest_collection_code=(_value) latest_collection_code=, note note, note=(_value) note=, permitted_params : Hash(String, Array(String) | String) permitted_params, required_attributes required_attributes, set_attributes(id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE) set_attributes, set_collection_name_from_param(_value) set_collection_name_from_param, set_created_at_from_param(_value) set_created_at_from_param, set_id_from_param(_value) set_id_from_param, set_institution_code_from_param(_value) set_institution_code_from_param, set_latest_collection_code_from_param(_value) set_latest_collection_code_from_param, set_note_from_param(_value) set_note_from_param, set_user_id_from_param(_value) set_user_id_from_param, user_id user_id, user_id=(_value) user_id=

Constructor methods inherited from class CollectionSetting::SaveOperation

new(record : T, params : Avram::Paramable, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE)
new(params : Avram::Paramable, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE)
new(record : T, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE)
new(id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE)
new

Class methods inherited from class CollectionSetting::SaveOperation

create(params, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE, &)
create(id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE, &)
create(params : Hash, **named_args, &)
create
, create!(params, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE)
create!(id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE)
create!(params : Hash, **named_args)
create!
, update(record : T, with params, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE, &)
update(record : T, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE, &)
update(record : T, params : Hash, **named_args, &)
update
, update!(record : T, with params, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE)
update!(record : T, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE)
update!(record : T, params : Hash, **named_args)
update!

Macros inherited from class CollectionSetting::SaveOperation

param_key(key) param_key

Constructor Detail

def self.new(record : T, params : Avram::Paramable, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.new(params : Avram::Paramable, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.new(record : T, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.new(id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


Class Method Detail

def self.create(params, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE, &) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.create(id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE, &) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.create(params : Hash, **named_args, &) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.create!(params, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.create!(id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.create!(params : Hash, **named_args) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.update(record : T, with params, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE, &) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.update(record : T, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE, &) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.update(record : T, params : Hash, **named_args, &) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.update!(record : T, with params, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.update!(record : T, id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def self.update!(record : T, params : Hash, **named_args) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


Macro Detail

macro param_key(key) #

コレクション設定の保存オペレーション


Instance Method Detail

def before_save #

[View source]
def collection_name #

[View source]
def id #

[View source]
def institution_code #

[View source]
def latest_collection_code #

[View source]
def note #

[View source]
def set_attributes(id : UUID | Avram::Nothing = IGNORE, created_at : Time | Avram::Nothing = IGNORE, user_id : Int32 | Avram::Nothing | Nil = IGNORE, collection_name : String | Avram::Nothing = IGNORE, institution_code : String | Avram::Nothing = IGNORE, latest_collection_code : Int32 | Avram::Nothing = IGNORE, note : String | Avram::Nothing = IGNORE) #

@type is not correct in this method, but is in the macro we call below That is why this extrac macro was extracted. We need @type to get the attributes for this SaveOperation


def user_id #

[View source]