Class SQLStream
java.lang.Object
com.espertech.esper.common.client.soda.Stream
com.espertech.esper.common.client.soda.SQLStream
- All Implemented Interfaces:
Serializable
An SQL stream that polls via SQL for events via join.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SQLStream
Creates a new SQL-based stream.static SQLStream
Creates a new SQL-based stream.static SQLStream
create
(String databaseName, String sqlWithSubsParams, String optStreamName, String optionalMetadataSQL) Creates a new SQL-based stream.Returns the database name.Returns the metadata SQL if any.Returns the SQL with optional substitution parameters in the SQL.void
setDatabaseName
(String databaseName) Sets the database name.void
setOptionalMetadataSQL
(String optionalMetadataSQL) Sets metadata SQL.void
setSqlWithSubsParams
(String sqlWithSubsParams) Sets the SQL with optional substitution parameters in the SQL.void
toEPLStream
(StringWriter writer, EPStatementFormatter formatter) Renders the stream in textual representation.void
toEPLStreamOptions
(StringWriter writer) Renders the stream in textual representation any stream options, if present.void
toEPLStreamType
(StringWriter writer) Renders the stream type under a non-complete textual representation for tool useMethods inherited from class com.espertech.esper.common.client.soda.Stream
getStreamName, setStreamName, toEPL
-
Constructor Details
-
SQLStream
public SQLStream()Ctor. -
SQLStream
public SQLStream(String databaseName, String sqlWithSubsParams, String optStreamName, String optionalMetadataSQL) Ctor.- Parameters:
databaseName
- is the database name to pollsqlWithSubsParams
- is the SQL to useoptStreamName
- is the optional as-name of the stream, or null if unnamedoptionalMetadataSQL
- optional SQL delivering metadata of statement
-
-
Method Details
-
create
Creates a new SQL-based stream.- Parameters:
databaseName
- is the database name to pollsqlWithSubsParams
- is the SQL to use- Returns:
- stream
-
create
Creates a new SQL-based stream.- Parameters:
databaseName
- is the database name to pollsqlWithSubsParams
- is the SQL to useoptStreamName
- is the as-name of the stream- Returns:
- stream
-
create
public static SQLStream create(String databaseName, String sqlWithSubsParams, String optStreamName, String optionalMetadataSQL) Creates a new SQL-based stream.- Parameters:
databaseName
- is the database name to pollsqlWithSubsParams
- is the SQL to useoptStreamName
- is the as-name of the streamoptionalMetadataSQL
- optional SQL delivering metadata of statement- Returns:
- stream
-
getDatabaseName
Returns the database name.- Returns:
- database name
-
setDatabaseName
Sets the database name.- Parameters:
databaseName
- database name
-
getSqlWithSubsParams
Returns the SQL with optional substitution parameters in the SQL.- Returns:
- SQL
-
setSqlWithSubsParams
Sets the SQL with optional substitution parameters in the SQL.- Parameters:
sqlWithSubsParams
- SQL set set
-
getOptionalMetadataSQL
Returns the metadata SQL if any.- Returns:
- metadata SQL
-
setOptionalMetadataSQL
Sets metadata SQL.- Parameters:
optionalMetadataSQL
- is the SQL to fire to obtain metadata from, or null if disabled
-
toEPLStream
Description copied from class:Stream
Renders the stream in textual representation.- Specified by:
toEPLStream
in classStream
- Parameters:
writer
- to output toformatter
- for newline-whitespace formatting
-
toEPLStreamType
Description copied from class:Stream
Renders the stream type under a non-complete textual representation for tool use- Specified by:
toEPLStreamType
in classStream
- Parameters:
writer
- to output to
-
toEPLStreamOptions
Description copied from class:Stream
Renders the stream in textual representation any stream options, if present.- Specified by:
toEPLStreamOptions
in classStream
- Parameters:
writer
- to output to
-