Parameter

DearDiary.get_parameterFunction
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.

source
get_parameter(client::Client, id::Integer)::Optional{Parameter}

Fetch a Parameter via GET /parameter/{id}. Returns nothing when the server replies 404 and raises ClientError for other failures.

source
DearDiary.get_parametersFunction
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.

source
get_parameters(iteration_id::Integer, page::Pagination)::PaginatedResponse{Parameter}

Get a page of Parameter records for an iteration, with total count populated.

Arguments

  • iteration_id::Integer: The id of the iteration to query.
  • page::Pagination: The page bounds (limit + offset).

Returns

A PaginatedResponse of Parameter.

source
get_parameters(client::Client, iteration_id::Integer)::Array{Parameter,1}

Convenience wrapper around the paged form: returns the first page (default limit) of Parameter records under iteration_id and discards the pagination envelope.

source
get_parameters(client::Client, iteration_id::Integer, page::Pagination)::PaginatedResponse{Parameter}

Fetch a page of Parameter records under iteration_id via GET /parameter/iteration/{iteration_id}?limit=…&offset=….

source
DearDiary.create_parameterFunction
create_parameter(iteration_id::Integer, key::AbstractString, value::AbstractString)::NamedTuple{id::Optional{<:Int64},status::DataType}

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, nothing is returned.
  • 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
create_parameter(iteration_id::Integer, key::AbstractString, value::Real)::NamedTuple{id::Optional{<:Int64},status::DataType}

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, nothing is returned.
  • 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
create_parameter(client::Client, iteration_id::Integer, key::AbstractString, value::AbstractString)::Int64

Append a Parameter (string-valued) to iteration_id via POST /parameter/iteration/{iteration_id}. The parent iteration must not be terminated; the server rejects writes to ended iterations. Returns the new parameter id.

source
create_parameter(client::Client, iteration_id::Integer, key::AbstractString, value::Real)::Int64

Real-typed overload of create_parameter; stringifies value before sending so numeric hyperparameters round-trip through the underlying TEXT column unchanged.

source
DearDiary.update_parameterFunction
update_parameter(id::Integer, key::Optional{AbstractString}, value::Optional{AbstractString})::Type{<:UpsertResult}

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

source
update_parameter(id::Integer, key::Optional{AbstractString}, value::Real)::Type{<:UpsertResult}

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

source
update_parameter(client::Client, id::Integer; key=nothing, value=nothing)::Nothing

Patch a Parameter via PATCH /parameter/{id}. Any keyword left as nothing is left untouched. Fails when the parent iteration has already been ended.

source
update_parameter(client::Client, id::Integer, value::Real; key=nothing)::Nothing

Real-typed overload of update_parameter; stringifies value before sending.

source
DearDiary.delete_parameterFunction
delete_parameter(id::Integer)::Bool

Delete a Parameter record.

Arguments

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

Returns

true if the record was successfully deleted, false otherwise.

source
delete_parameter(client::Client, id::Integer)::Nothing

Delete a Parameter via DELETE /parameter/{id}. Requires DeletePermission on the iteration's project.

source