Experiment
DearDiary.get_experiment — Functionget_experiment(id::Integer)::Optional{Experiment}Get a Experiment by id.
Arguments
id::Integer: The id of the experiment to query.
Returns
A Experiment object. If the record does not exist, return nothing.
DearDiary.get_experiments — Functionget_experiments(project_id::Integer)::Array{Experiment, 1}Get all Experiment for a given project.
Arguments
project_id::Integer: The id of the project to query.
Returns
An array of Experiment objects.
DearDiary.create_experiment — Functioncreate_experiment(project_id::Integer, status_id::Integer, name::AbstractString)::Tuple{Optional{<:Int64},UpsertResult}Create a Experiment.
Arguments
project_id::Integer: The id of the project to create the experiment for.status_id::Integer: The status of the experiment.name::AbstractString: The name of the experiment.
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.
create_experiment(project_id::Integer, status::Status, name::AbstractString)::Tuple{Optional{<:Int64},UpsertResult}Create a Experiment.
Arguments
project_id::Integer: The id of the project to create the experiment for.status::Status: The status of the experiment.name::AbstractString: The name of the experiment.
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_experiment — Functionupdate_experiment(id::Integer, status::Optional{Integer}, name::Optional{AbstractString}, description::Optional{AbstractString}, end_date::Optional{DateTime})::UpsertResultUpdate a Experiment record.
Arguments
id::Integer: The id of the experiment to update.status_id::Optional{Integer}: The new status of the experiment.name::Optional{AbstractString}: The new name of the experiment.description::Optional{AbstractString}: The new description of the experiment.end_date::Optional{DateTime}: The new end date of the experiment.
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_experiment(id::Integer, status::Optional{Status}, name::Optional{AbstractString}, description::Optional{AbstractString}, end_date::Optional{DateTime})::UpsertResultUpdate a Experiment record.
Arguments
id::Integer: The id of the experiment to update.status_id::Optional{Status}: The new status of the experiment.name::Optional{AbstractString}: The new name of the experiment.description::Optional{AbstractString}: The new description of the experiment.end_date::Optional{DateTime}: The new end date of the experiment.
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_experiment — Functiondelete_experiment(id::Integer)::BoolDelete a Experiment record. Also deletes all associated Iteration and Resource records.
Arguments
id::Integer: The id of the experiment to delete.
Returns
true if the record was successfully deleted, false otherwise.