class SavePessoa
- SavePessoa
- Pessoa::SaveOperation
- Avram::SaveOperation(Pessoa)
- Reference
- Object
Defined in:
operations/save_pessoa.crConstant Summary
-
ATTRIBUTES =
[nascimento_as_string : String, stack_as_string : String] of Nil
-
COLUMN_ATTRIBUTES =
[{name: id, type: UUID, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: apelido, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: nome, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: nascimento, type: Time, nilable: true, autogenerated: false, value: nil, serialized: false}, {name: stack, type: String, nilable: true, autogenerated: false, value: nil, serialized: false}, {name: id, type: UUID, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: apelido, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: nome, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: nascimento, type: Time, nilable: true, autogenerated: false, value: nil, serialized: false}, {name: stack, type: String, nilable: true, autogenerated: false, value: nil, serialized: false}] of Nil
-
FOREIGN_KEY =
"pessoa_id"
-
OPERATION_NEEDS =
[] of Nil
Constructors
-
.new(record : T, params : Avram::Paramable, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.new(params : Avram::Paramable, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.new(record : T, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.new(id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
Class Method Summary
- .build(pessoa : Pessoa)
-
.create(params, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.create(id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.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.
-
.create!(params, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.create!(id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.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.
-
.update(record : T, with params, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.update(record : T, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.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.
-
.update!(record : T, with params, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.update!(record : T, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
.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.
Instance Method Summary
-
#apelido
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/saving-records#perma-permitting-columns
- #attributes
- #before_save
-
#id
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/saving-records#perma-permitting-columns
-
#nascimento
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/saving-records#perma-permitting-columns
- #nascimento_as_string
-
#nome
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/saving-records#perma-permitting-columns
-
#set_attributes(id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, nascimento_as_string : String | Avram::Nothing = Avram::Nothing.new, stack_as_string : String | Avram::Nothing = 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.
-
#stack
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/saving-records#perma-permitting-columns
- #stack_as_string
- #values : Hash(Symbol, String | Nil)
Macro Summary
Instance methods inherited from class Pessoa::SaveOperation
apelido
apelido,
apelido=(_value)
apelido=,
attributes
attributes,
id
id,
id=(_value)
id=,
nascimento
nascimento,
nascimento=(_value)
nascimento=,
nome
nome,
nome=(_value)
nome=,
permitted_params : Hash(String, Array(String) | String)
permitted_params,
required_attributes
required_attributes,
set_apelido_from_param(_value)
set_apelido_from_param,
set_attributes(id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new)
set_attributes,
set_id_from_param(_value)
set_id_from_param,
set_nascimento_from_param(_value)
set_nascimento_from_param,
set_nome_from_param(_value)
set_nome_from_param,
set_stack_from_param(_value)
set_stack_from_param,
stack
stack,
stack=(_value)
stack=
Constructor methods inherited from class Pessoa::SaveOperation
new(record : T, params : Avram::Paramable, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new)new(params : Avram::Paramable, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new)
new(record : T, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new)
new(id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new) new
Class methods inherited from class Pessoa::SaveOperation
create(params, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, &)create(id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, &)
create(params : Hash, **named_args, &) create, create!(params, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new)
create!(id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : 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, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new, &)
update(record : T, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : 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, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new)
update!(record : T, id : UUID | Avram::Nothing = Avram::Nothing.new, apelido : String | Avram::Nothing = Avram::Nothing.new, nome : String | Avram::Nothing = Avram::Nothing.new, nascimento : Time | Avram::Nothing | Nil = Avram::Nothing.new, stack : String | Avram::Nothing | Nil = Avram::Nothing.new)
update!(record : T, params : Hash, **named_args) update!
Constructor Detail
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/saving-records#perma-permitting-columns
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/saving-records#perma-permitting-columns
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/saving-records#perma-permitting-columns
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/saving-records#perma-permitting-columns
@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
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/saving-records#perma-permitting-columns