DynFork::QPaladins::Save
Creating and updating documents in the database.
Instance methods
save
Creating and updating documents in the database.
This method pre-uses the check method.
Simple example:
@[DynFork::Meta(service_name: "Accounts")]
struct User < DynFork::Model
getter username = DynFork::Fields::TextField.new
getter birthday = DynFork::Fields::DateField.new
end
user = User.new
user.username.value = "username"
user.birthday.value = "1970-01-01"
user.print_err unless user.save
# print_err - convenient during development.