Metric
DearDiary.get_metric — Functionget_metric(id::Integer)::Optional{Metric}Get a Metric by id.
Arguments
id::Integer: The id of the metric to query.
Returns
A Metric object. If the record does not exist, return nothing.
DearDiary.get_metrics — Functionget_metrics(iteration_id::Integer)::Array{Metric, 1}Get all Metric for a given iteration.
Arguments
iteration_id::Integer: The id of the iteration to query.
Returns
An array of Metric objects.
DearDiary.create_metric — Functioncreate_metric(iteration_id::Integer, key::AbstractString, value::AbstractFloat)::Tuple{Optional{<:Int64},UpsertResult}Arguments
iteration_id::Integer: The id of the iteration to create the metric for.key::AbstractString: The key of the metric.value::AbstractFloat: The value of the metric.
Returns
An UpsertResult. Created if the record was successfully created, Duplicate if the record already exists, Unprocessable if the record violates a constraint, and Error if an error occurred while creating the record.
DearDiary.update_metric — Functionupdate_metric(id::Integer, key::Optional{AbstractString}, value::Optional{AbstractFloat})::UpsertResultUpdate a Metric record.
Arguments
id::Integer: The id of the metric to update.key::Optional{AbstractString}: The new key for the metric.value::Optional{AbstractFloat}: The new value for the metric.
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_metric — Functiondelete_metric(id::Integer)::BoolDelete a Metric record.
Arguments
id::Integer: The id of the metric to delete.
Returns
true if the record was successfully deleted, false otherwise.