Package com.illumon.iris.db.v2.updateby
Interface UpdateByClause
- All Known Implementing Classes:
ColumnUpdateClause
public interface UpdateByClause
Defines an operation that can be applied to a table with
Table.updateBy(Collection, String...)-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceUpdateByClause.Visitor -
Method Summary
Modifier and Type Method Description static UpdateByClauseema(long timeScaleTicks, EmaControl.Builder control, String... columns)Create an Exponential Moving Average of the specified columns, using ticks as the decay unit.static UpdateByClauseema(long timeScaleTicks, EmaControl control, String... columns)Create an Exponential Moving Average of the specified columns, using ticks as the decay unit.static UpdateByClauseema(String timestampColumn, long timeScaleNanos, EmaControl.Builder control, String... columns)Create an Exponential Moving Average of the specified columns, using time as the decay unit.static UpdateByClauseema(String timestampColumn, long timeScaleNanos, EmaControl control, String... columns)Create an Exponential Moving Average of the specified columns, using time as the decay unit.static UpdateByClausefill(String... columnsToFill)Create a forward fill operation for the specified columns.static UpdateByClausemax(String... columns)Create a Cumulative Maximum of the specified columns.static UpdateByClausemin(String... columns)Create a Cumulative Minimum of the specified columns.static ColumnUpdateClauseof(UpdateBySpec spec, String... columns)Conjoin anUpdateBySpecwith columns for it to be applied to so the engine can construct the proper operators.static Collection<UpdateByClause>of(UpdateByClause... operations)Simply wrap the input specs as a collection suitable forTable.updateBy(Collection, MatchPair...).static UpdateByClauseprod(String... columns)Create a Cumulative Product of the specified columns.static UpdateByClausesum(String... columnsToSum)Create a forward fill operation for the specified columns.<V extends UpdateByClause.Visitor>
Vwalk(V v)
-
Method Details
-
of
Conjoin anUpdateBySpecwith columns for it to be applied to so the engine can construct the proper operators.- Parameters:
spec- theUpdateBySpecthat defines the operation to performcolumns- the columns to apply the operation to.- Returns:
- a
ColumnUpdateClausethat will be used to construct operations for each column
-
of
Simply wrap the input specs as a collection suitable forTable.updateBy(Collection, MatchPair...). This is functionally equivalent toArrays.asList(Object[]).- Parameters:
operations- the operations to wrap.- Returns:
- a collection for use with
Table.updateBy(Collection, MatchPair...)
-
sum
Create a forward fill operation for the specified columns.- Parameters:
columnsToSum- the columns to fill.- Returns:
- a new
UpdateByClausefor performing a forward fill withTable.updateBy(Collection, MatchPair...)
-
fill
Create a forward fill operation for the specified columns.- Parameters:
columnsToFill- the columns to fill.- Returns:
- a new
UpdateByClausefor performing a forward fill withTable.updateBy(Collection, MatchPair...)
-
min
Create a Cumulative Minimum of the specified columns.- Parameters:
columns- the columns to find the min- Returns:
- a new
UpdateByClausefor performing a cumulative min withTable.updateBy(Collection, MatchPair...)
-
max
Create a Cumulative Maximum of the specified columns.- Parameters:
columns- the columns to find the min- Returns:
- a new
UpdateByClausefor performing a cumulative max withTable.updateBy(Collection, MatchPair...)
-
prod
Create a Cumulative Product of the specified columns.- Parameters:
columns- the columns to find the min- Returns:
- a new
UpdateByClausefor performing a cumulative produce withTable.updateBy(Collection, MatchPair...)
-
ema
static UpdateByClause ema(long timeScaleTicks, @NotNull EmaControl.Builder control, String... columns)Create an Exponential Moving Average of the specified columns, using ticks as the decay unit.The formula used is
a = e^(-1 / timeScaleTicks) ema_next = a * ema_last + (1 - a) * value- Parameters:
timeScaleTicks- the decay rate (tau) in tickscontrol- acontrolobject that defines how special cases should behave. SeeEmaControlfor further details.columns- the columns to apply the EMA to.- Returns:
- a new
UpdateByClausefor performing an EMA withTable.updateBy(Collection, MatchPair...)
-
ema
Create an Exponential Moving Average of the specified columns, using ticks as the decay unit.The formula used is
a = e^(-1 / timeScaleTicks) ema_next = a * ema_last + (1 - a) * value- Parameters:
timeScaleTicks- the decay rate (tau) in tickscontrol- acontrolobject that defines how special cases should behave. SeeEmaControlfor further details.columns- the columns to apply the EMA to.- Returns:
- a new
UpdateByClausefor performing an EMA withTable.updateBy(Collection, MatchPair...)
-
ema
static UpdateByClause ema(@NotNull String timestampColumn, long timeScaleNanos, @NotNull EmaControl.Builder control, String... columns)Create an Exponential Moving Average of the specified columns, using time as the decay unit.
The formula used is
a = e^(-dt / timeScaleNanos) ema_next = a * ema_last + (1 - a) * value- Parameters:
timestampColumn- the column in the source table to use for timestampstimeScaleNanos- the decay rate (tau) in nanosecondscontrol- acontrolobject that defines how special cases should behave. SeeEmaControlfor further details.columns- the columns to apply the EMA to.- Returns:
- a new
UpdateByClausefor performing an EMA withTable.updateBy(Collection, MatchPair...)
-
ema
static UpdateByClause ema(@NotNull String timestampColumn, long timeScaleNanos, @NotNull EmaControl control, String... columns)Create an Exponential Moving Average of the specified columns, using time as the decay unit.The formula used is
a = e^(-dt / timeScaleNanos) ema_next = a * ema_last + (1 - a) * value- Parameters:
timestampColumn- the column in the source table to use for timestampstimeScaleNanos- the decay rate (tau) in nanosecondscontrol- acontrolobject that defines how special cases should behave. SeeEmaControlfor further details.columns- the columns to apply the EMA to.- Returns:
- a new
UpdateByClausefor performing an EMA withTable.updateBy(Collection, MatchPair...)
-
walk
-