class UpdateChat

Defined in:

operations/chat_update.cr

Constant Summary

ATTRIBUTES = [] of Nil
COLUMN_ATTRIBUTES = [{name: id, type: UUID, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: creator_id, type: User::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: name, type: String, nilable: true, autogenerated: false, value: nil, serialized: false}, {name: id, type: UUID, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: creator_id, type: User::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: name, type: String, nilable: true, autogenerated: false, value: nil, serialized: false}] of Nil
FOREIGN_KEY = "chat_id"
OPERATION_NEEDS = [current_user : User] of Nil

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Instance methods inherited from class Chat::SaveOperation

attributes attributes, creator_id creator_id, creator_id=(_value) creator_id=, id id, id=(_value) id=, name name, name=(_value) name=, permitted_params permitted_params, required_attributes required_attributes, set_attributes(id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new) set_attributes, set_creator_id_from_param(_value) set_creator_id_from_param, set_id_from_param(_value) set_id_from_param, set_name_from_param(_value) set_name_from_param

Constructor methods inherited from class Chat::SaveOperation

new(record : T, params : Avram::Paramable, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new)
new(params : Avram::Paramable, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new)
new(record : T, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new)
new(id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new)
new

Class methods inherited from class Chat::SaveOperation

create(params, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new, &)
create(id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new, &)
create(params : Hash, **named_args, &)
create
, create!(params, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new)
create!(id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new)
create!(params : Hash, **named_args)
create!
, update(record : T, with params, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new, &)
update(record : T, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new, &)
update(record : T, params : Hash, **named_args, &)
update
, update!(record : T, with params, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new)
update!(record : T, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new)
update!(record : T, params : Hash, **named_args)
update!

Constructor Detail

def self.new(record : T, params : Avram::Paramable, current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new) #

@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, current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new) #

@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, current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new) #

@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(current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new) #

@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, current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new, &) #

@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(current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new, &) #

@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, current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new) #

@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!(current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new) #

@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.param_key #

[View source]
def self.update(record : T, with params, current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new, &) #

@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, current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new, &) #

@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, current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new) #

@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, current_user : User, id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new) #

@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


Instance Method Detail

def before_save #

[View source]
def current_user : User #

def current_user=(current_user : User) #

def name #

[View source]
def set_attributes(id : UUID | Avram::Nothing = Avram::Nothing.new, creator_id : User::PrimaryKeyType | Avram::Nothing = Avram::Nothing.new, name : String | Avram::Nothing | Nil = Avram::Nothing.new) #

@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) #