Metric

DearDiary.get_metricFunction
get_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.

source
DearDiary.get_metricsFunction
get_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.

source
DearDiary.create_metricFunction
create_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.

source
DearDiary.update_metricFunction
update_metric(id::Integer, key::Optional{AbstractString}, value::Optional{AbstractFloat})::UpsertResult

Update 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.

source
DearDiary.delete_metricFunction
delete_metric(id::Integer)::Bool

Delete a Metric record.

Arguments

  • id::Integer: The id of the metric to delete.

Returns

true if the record was successfully deleted, false otherwise.

source