Iteration
DearDiary.get_iteration — Function
get_iteration(id::Integer)::Optional{Iteration}Get a Iteration by id.
Arguments
id::Integer: The id of the iteration to query.
Returns
A Iteration object. If the record does not exist, return nothing.
DearDiary.get_iterations — Function
get_iterations(experiment_id::Integer)::Array{Iteration, 1}Get all Iteration for a given experiment.
Arguments
experiment_id::Integer: The id of the experiment to query.
Returns
An array of Iteration objects.
DearDiary.create_iteration — Function
create_iteration(experiment_id::Integer)::NamedTuple{id::Optional{<:Int64},status::UpsertResult}Create a Iteration.
Arguments
experiment_id::Integer: The id of the experiment to create the iteration for.
Returns
- The created iteration 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_iteration — Function
update_iteration(id::Int, notes::Optional{AbstractString}, end_date::Optional{DateTime})::UpsertResultUpdate a Iteration record.
Arguments
id::Integer: The id of the iteration to update.notes::Optional{AbstractString}: The new notes for the iteration.end_date::Optional{DateTime}: The new end date for the iteration.
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_iteration — Function
delete_iteration(id::Integer)::BoolDelete a Iteration record.
Arguments
id::Integer: The id of the iteration to delete. Also deletes all associatedParameterandMetricrecords.
Returns
true if the record was successfully deleted, false otherwise.