class SavePost
- SavePost
- Post::SaveOperation
- Avram::SaveOperation(Post)
- Reference
- Object
Defined in:
operations/save_post.crConstant Summary
-
ATTRIBUTES =
[] of Nil
-
COLUMN_ATTRIBUTES =
[{name: id, type: UUID, nilable: false, autogenerated: true, value: nil}, {name: created_at, type: Time, nilable: false, autogenerated: true, value: nil}, {name: updated_at, type: Time, nilable: false, autogenerated: true, value: nil}, {name: body, type: String, nilable: false, autogenerated: false, value: nil}, {name: id, type: UUID, nilable: false, autogenerated: true, value: nil}, {name: created_at, type: Time, nilable: false, autogenerated: true, value: nil}, {name: updated_at, type: Time, nilable: false, autogenerated: true, value: nil}, {name: body, type: String, nilable: false, autogenerated: false, value: nil}] of Nil
-
FOREIGN_KEY =
"post_id"
-
OPERATION_NEEDS =
[] of Nil
Constructors
-
.new(record : T, params : Avram::Paramable, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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 | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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 | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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 | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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
-
.create(params, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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 | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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 | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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 | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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 | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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 | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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 | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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 | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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
-
#body
To save user provided params to the database, you must permit them https://luckyframework.org/guides/database/validating-saving#perma-permitting-columns
-
#set_attributes(id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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.
Macro Summary
Instance methods inherited from class Post::SaveOperation
attributes
attributes,
before_save
before_save,
body
body,
body=(_value)
body=,
created_at
created_at,
created_at=(_value)
created_at=,
id
id,
id=(_value)
id=,
permitted_params
permitted_params,
required_attributes
required_attributes,
set_attributes(id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new)
set_attributes,
set_body_from_param(_value)
set_body_from_param,
set_created_at_from_param(_value)
set_created_at_from_param,
set_id_from_param(_value)
set_id_from_param,
set_updated_at_from_param(_value)
set_updated_at_from_param,
set_uuid
set_uuid,
updated_at
updated_at,
updated_at=(_value)
updated_at=
Constructor methods inherited from class Post::SaveOperation
new(record : T, params : Avram::Paramable, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new)new(params : Avram::Paramable, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new)
new(record : T, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new)
new(id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new) new
Class methods inherited from class Post::SaveOperation
create(params, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new, &)create(id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new, &)
create(params : Hash, **named_args, &) create, create!(params, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new)
create!(id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new)
create!(params : Hash, **named_args) create!, update(record : T, with params, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new, &)
update(record : T, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new, &)
update(record : T, params : Hash, **named_args, &) update, update!(record : T, with params, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = Nothing.new)
update!(record : T, id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, body : String | Nothing = 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/validating-saving#perma-permitting-columns
permit_columns column_1, column_2
@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