phasedb v0.0.2 PhaseDB.Insert
Describes an operation to insert a Sample into a series as an abstract syntax for:
Example:
use Calendar
import PhaseDB.Insert
alias PhaseDB.Query
insert
|> value(3.1415927)
|> recorded_at(DateTime.now_utc)
|> tag(:precision, 7)
|> into("database_name", "series_name")
|> Query.execute
Summary
Functions
Create an empty insert query
Add the query target to the query
The time that the value was recorded
Insert a tag along with the value
The value to insert for a given recorded_at
time
Types
t :: %PhaseDB.Insert{database_name: term, sample: term, series_name: term}
Functions
Add the query target to the query.
Params: - insert
- an existing insert query created by insert
. - database_name
- the name of the database to insert into. - series_name
- the name of the series to insert into.
Specs
recorded_at(t, PhaseDB.TimeHelpers.utc_usecs | Calendar.DateTime.t) :: t
The time that the value was recorded.
Params: - insert
- an existing insert query created by insert
. - time
- either usecs since 1 Jan 1970 UTC or a Calendar.DateTime
.
Insert a tag along with the value.
Params: - insert
- an existing insert query created by insert
. - tag
- name of the tag to insert. String or Atom. - value
- value of the tag. String or Number.