Parameter
DearDiary.get_parameter — Function
get_parameter(id::Integer)::Optional{Parameter}Get a Parameter by id.
Arguments
id::Integer: The id of the parameter to query.
Returns
A Parameter object. If the record does not exist, return nothing.
DearDiary.get_parameters — Function
get_parameters(iteration_id::Integer)::Array{Parameter, 1}Get all Parameter for a given iteration.
Arguments
iteration_id::Integer: The id of the iteration to query.
Returns
An array of Parameter objects.
DearDiary.create_parameter — Function
create_parameter(iteration_id::Integer, key::AbstractString, value::AbstractString)::NamedTuple{id::Optional{<:Int64},status::UpsertResult}Create a Parameter.
Arguments
iteration_id::Integer: The id of the iteration to create the parameter for.key::AbstractString: The key of the parameter.value::AbstractString: The value of the parameter.
Returns
- The created parameter ID. If an error occurs,
nothingis returned. - An
UpsertResult.Createdif the record was successfully created,Duplicateif the record already exists,Unprocessableif the record violates a constraint, andErrorif an error occurred while creating the record.
create_parameter(iteration_id::Integer, key::AbstractString, value::Real)::NamedTuple{id::Optional{<:Int64},status::UpsertResult}Create a Parameter.
Arguments
iteration_id::Integer: The id of the iteration to create the parameter for.key::AbstractString: The key of the parameter.value::Real: The value of the parameter.
Returns
- The created parameter ID. If an error occurs,
nothingis returned. - An
UpsertResult.Createdif the record was successfully created,Duplicateif the record already exists,Unprocessableif the record violates a constraint, andErrorif an error occurred while creating the record.
DearDiary.update_parameter — Function
update_parameter(id::Integer, key::Optional{AbstractString}, value::Optional{AbstractString})::UpsertResultUpdate a Parameter record.
Arguments
id::Integer: The id of the parameter to update.key::Optional{AbstractString}: The new key for the parameter.value::Optional{AbstractString}: The new value for the parameter.
Returns
An UpsertResult. Updated if the record was successfully updated (or no changes were made), Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.
update_parameter(id::Integer, key::Optional{AbstractString}, value::Real)::UpsertResultUpdate a Parameter record.
Arguments
id::Integer: The id of the parameter to update.key::Optional{AbstractString}: The new key for the parameter.value::Real: The new value for the parameter.
Returns
An UpsertResult. Updated if the record was successfully updated (or no changes were made), Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.
DearDiary.delete_parameter — Function
delete_parameter(id::Integer)::BoolDelete a Parameter record.
Arguments
id::Integer: The id of the parameter to delete.
Returns
true if the record was successfully deleted, false otherwise.