Membrane.Telemetry.TimescaleDB.Model (Membrane Telemetry TimescaleDB v0.1.0) View Source
Module responsible for putting data to TimescaleDB.
Link to this section Summary
Functions
Inserts all given measurements into a database as a batch.
Link to this section Functions
Specs
add_all_measurements({list(), list(), list()}) ::
{:ok, non_neg_integer(), map()}
Inserts all given measurements into a database as a batch.
Takes a tuple consisting of 3 lists:
with_paths- list of measurements with already presentcomponent_path_idreplacingcomponent_pathwithout_paths- list of measurements with unknowncomponent_path_idbut with a presentcomponent_pathfieldspaths_to_insert- list of components' paths that must be inserted to the database, the inserted records are then used to assign`without_paths` their corresponding `path_id`s
Returns number of inserted records and a mapping of newly inserted paths {component_path => component_path_id}.
Specs
add_element_event(map()) :: {:ok, Membrane.Telemetry.TimescaleDB.Model.Element.t()} | {:error, Ecto.Changeset.t()}
Specs
add_link(map()) :: {:ok, Membrane.Telemetry.TimescaleDB.Model.Link.t()} | {:error, Ecto.Changeset.t()}
Specs
add_measurement(map()) :: {:ok, Membrane.Telemetry.TimescaleDB.Model.Measurement.t()} | {:error, Ecto.Changeset.t()}