@Description(value="Executes a prepared query for each record received.")
@In(value=org.culturegraph.mf.framework.StreamReceiver.class)
public final class SqlStreamSink
extends org.culturegraph.mf.framework.helpers.DefaultStreamReceiver
This module does not evaluate the result set which may be returned by executing the query. This makes this module suitable for performing operations such as INSERT, UPDATE or DELETE.
Use SqlStreamPipe
if access to the results of the SQL query is
required.
SqlStreamPipe
Modifier and Type | Field and Description |
---|---|
static String |
ID_PARAMETER |
Constructor and Description |
---|
SqlStreamSink(Connection connection) |
SqlStreamSink(String dataSource) |
Modifier and Type | Method and Description |
---|---|
void |
closeStream() |
void |
endRecord() |
void |
literal(String name,
String value) |
void |
setQuery(String sql) |
void |
startRecord(String id) |
endEntity, startEntity
public static final String ID_PARAMETER
public SqlStreamSink(String dataSource)
public SqlStreamSink(Connection connection)
public void setQuery(String sql)
public void startRecord(String id)
startRecord
in interface org.culturegraph.mf.framework.StreamReceiver
startRecord
in class org.culturegraph.mf.framework.helpers.DefaultStreamReceiver
public void endRecord()
endRecord
in interface org.culturegraph.mf.framework.StreamReceiver
endRecord
in class org.culturegraph.mf.framework.helpers.DefaultStreamReceiver
public void literal(String name, String value)
literal
in interface org.culturegraph.mf.framework.StreamReceiver
literal
in class org.culturegraph.mf.framework.helpers.DefaultStreamReceiver
public void closeStream()
closeStream
in interface org.culturegraph.mf.framework.LifeCycle
closeStream
in class org.culturegraph.mf.framework.helpers.DefaultLifeCycle
Copyright © 2017. All rights reserved.