Class InsertIntoClause
java.lang.Object
com.espertech.esper.common.client.soda.InsertIntoClause
- All Implemented Interfaces:
Serializable
An insert-into clause consists of a stream name and column names and an optional stream selector.
- See Also:
-
Constructor Summary
ConstructorDescriptionCtor.InsertIntoClause
(String streamName) Ctor.InsertIntoClause
(String streamName, String[] columnNames) Ctor.InsertIntoClause
(String streamName, List<String> columnNames, StreamSelector streamSelector) Ctor.InsertIntoClause
(String streamName, List<String> columnNames, StreamSelector streamSelector, Expression eventPrecedence) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a column name to the insert-into clause.static InsertIntoClause
Creates the insert-into clause.static InsertIntoClause
Creates the insert-into clause.static InsertIntoClause
create
(String streamName, String[] columns, StreamSelector streamSelector) Creates the insert-into clause.static InsertIntoClause
create
(String streamName, String[] columns, StreamSelector streamSelector, Expression precedence) Creates the insert-into clause.Returns a list of column names specified optionally in the insert-into clause, or empty if none specified.Returns null when no event-precedence is specified for the insert-into, or returns the expression returning the event-precedenceReturns name of stream name to use for insert-into stream.Returns the stream selector for the insert into.void
setColumnNames
(List<String> columnNames) Set column names.void
setEventPrecedence
(Expression eventPrecedence) Set to null when no event-precedence is specified for the insert-into, or set an expression returning the event-precedencevoid
setStreamName
(String streamName) Set stream name.void
setStreamSelector
(StreamSelector streamSelector) Sets the stream selector for the insert into.void
toEPL
(StringWriter writer, EPStatementFormatter formatter, boolean isTopLevel) Renders the clause in textual representation.
-
Constructor Details
-
InsertIntoClause
public InsertIntoClause()Ctor. -
InsertIntoClause
Ctor.- Parameters:
streamName
- is the stream name to insert into
-
InsertIntoClause
Ctor.- Parameters:
streamName
- is the stream name to insert intocolumnNames
- column names
-
InsertIntoClause
Ctor.- Parameters:
streamName
- is the stream name to insert intocolumnNames
- column namesstreamSelector
- selector for either insert stream (the default) or remove stream or both
-
InsertIntoClause
public InsertIntoClause(String streamName, List<String> columnNames, StreamSelector streamSelector, Expression eventPrecedence) Ctor.- Parameters:
streamName
- is the stream name to insert intocolumnNames
- column namesstreamSelector
- selector for either insert stream (the default) or remove stream or botheventPrecedence
- event precedence or null if none provided
-
-
Method Details
-
create
Creates the insert-into clause.- Parameters:
streamName
- the name of the stream to insert into- Returns:
- clause
-
create
Creates the insert-into clause.- Parameters:
streamName
- the name of the stream to insert intocolumns
- is a list of column names- Returns:
- clause
-
create
public static InsertIntoClause create(String streamName, String[] columns, StreamSelector streamSelector) Creates the insert-into clause.- Parameters:
streamName
- the name of the stream to insert intocolumns
- is a list of column namesstreamSelector
- selects the stream- Returns:
- clause
-
create
public static InsertIntoClause create(String streamName, String[] columns, StreamSelector streamSelector, Expression precedence) Creates the insert-into clause.- Parameters:
streamName
- the name of the stream to insert intocolumns
- is a list of column namesstreamSelector
- selects the streamprecedence
- event precedence or null when not applicable- Returns:
- clause
-
getStreamSelector
Returns the stream selector for the insert into.- Returns:
- stream selector
-
setStreamSelector
Sets the stream selector for the insert into.- Parameters:
streamSelector
- stream selector
-
getStreamName
Returns name of stream name to use for insert-into stream.- Returns:
- stream name
-
getColumnNames
Returns a list of column names specified optionally in the insert-into clause, or empty if none specified.- Returns:
- column names or empty list if none supplied
-
setStreamName
Set stream name.- Parameters:
streamName
- name
-
add
Add a column name to the insert-into clause.- Parameters:
columnName
- to add
-
setColumnNames
Set column names.- Parameters:
columnNames
- names
-
getEventPrecedence
Returns null when no event-precedence is specified for the insert-into, or returns the expression returning the event-precedence- Returns:
- event-precedence expression
-
setEventPrecedence
Set to null when no event-precedence is specified for the insert-into, or set an expression returning the event-precedence- Parameters:
eventPrecedence
- event-precedence expression
-
toEPL
Renders the clause in textual representation.- Parameters:
writer
- to output toformatter
- for newline-whitespace formattingisTopLevel
- to indicate if this insert-into-clause is inside other clauses.
-