public class DmlOperations extends BaseDbOperations
| Modifier and Type | Class and Description |
|---|---|
static class |
DmlOperations.Builder |
| Modifier and Type | Field and Description |
|---|---|
protected BiFunction<ConfigurableStatementFactory,ResultSetHandler,QueryExecutor> |
querySingleQueryExecutorSupplier |
protected BiFunction<DbConnection,Charset,RowHandler> |
querySingleRowHandlerSupplier |
protected BiFunction<ConfigurableStatementFactory,ResultSetHandler,QueryExecutor> |
selectQueryExecutorSupplier |
protected BiFunction<DbConnection,Charset,RowHandler> |
selectRowHandlerSupplier |
protected BiFunction<DbConnection,Charset,RowHandler> |
storedProcedureRowHandlerSupplier |
DEFAULT_FETCH_SIZE, QUERY_GROUP, QUERY_SETTINGS, queryResolver, statementFactory, updateExecutor| Modifier and Type | Method and Description |
|---|---|
int |
delete(QueryDefinition query,
AbstractDbConnector connector,
DbConnection connection,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
Deletes data in a database.
|
protected static BiFunction<DbConnection,Charset,RowHandler> |
getDefaultInsensitiveMapRowHandler() |
protected static BiFunction<DbConnection,Charset,RowHandler> |
getDefaultNonStreamingInsensitiveMapRowHandler() |
protected static BiFunction<ConfigurableStatementFactory,ResultSetHandler,QueryExecutor> |
getDefaultSelectExecutor() |
protected static ParameterizedQueryResolver<StoredProcedureCall> |
getDefaultStoredProcedureResolver() |
StatementResult |
insert(QueryDefinition query,
AutoGenerateKeysAttributes autoGenerateKeysAttributes,
AbstractDbConnector connector,
DbConnection connection,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
Inserts data into a Database
|
Map<String,Object> |
querySingle(QueryDefinition query,
AbstractDbConnector connector,
DbConnection connection,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
Selects single result from a database.
|
protected Query |
resolveQuery(StoredProcedureCall call,
AbstractDbConnector connector,
DbConnection connection,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper,
QueryType... validTypes) |
org.mule.runtime.extension.api.runtime.streaming.PagingProvider<DbConnection,Map<String,Object>> |
select(QueryDefinition query,
AbstractDbConnector connector,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper,
org.mule.runtime.extension.api.runtime.operation.FlowListener flowListener)
Selects data from a database.
|
Map<String,Object> |
storedProcedure(StoredProcedureCall call,
AutoGenerateKeysAttributes autoGenerateKeysAttributes,
AbstractDbConnector connector,
DbConnection connection,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper,
org.mule.runtime.extension.api.runtime.operation.FlowListener flowListener)
Invokes a Stored Procedure on the database.
|
StatementResult |
update(QueryDefinition query,
AutoGenerateKeysAttributes autoGenerateKeysAttributes,
AbstractDbConnector connector,
DbConnection connection,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
Updates data in a database.
|
executeUpdate, getAutoGeneratedKeysStrategy, getDefaultQueryResolver, getDefaultStatementFactory, getDefaultUpdateExecutor, getFetchSize, getStatementFactory, resolveQuery, validateNoParameterTypeIsUnused, validateQueryTypeprotected BiFunction<DbConnection,Charset,RowHandler> selectRowHandlerSupplier
protected BiFunction<DbConnection,Charset,RowHandler> querySingleRowHandlerSupplier
protected BiFunction<DbConnection,Charset,RowHandler> storedProcedureRowHandlerSupplier
protected BiFunction<ConfigurableStatementFactory,ResultSetHandler,QueryExecutor> selectQueryExecutorSupplier
protected BiFunction<ConfigurableStatementFactory,ResultSetHandler,QueryExecutor> querySingleQueryExecutorSupplier
protected static ParameterizedQueryResolver<StoredProcedureCall> getDefaultStoredProcedureResolver()
protected static BiFunction<DbConnection,Charset,RowHandler> getDefaultInsensitiveMapRowHandler()
protected static BiFunction<DbConnection,Charset,RowHandler> getDefaultNonStreamingInsensitiveMapRowHandler()
protected static BiFunction<ConfigurableStatementFactory,ResultSetHandler,QueryExecutor> getDefaultSelectExecutor()
public org.mule.runtime.extension.api.runtime.streaming.PagingProvider<DbConnection,Map<String,Object>> select(QueryDefinition query, AbstractDbConnector connector, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper, org.mule.runtime.extension.api.runtime.operation.FlowListener flowListener) throws SQLException
query - a QueryDefinition as a parameter groupconnector - the acting connectorstreaming, it can be a List or Iterator of mapsSQLException - if an error is producedpublic Map<String,Object> querySingle(QueryDefinition query, AbstractDbConnector connector, DbConnection connection, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper) throws SQLException
query - a QueryDefinition as a parameter groupconnector - the acting connectorconnection - the acting connectionSQLException - if an error is producedpublic StatementResult insert(QueryDefinition query, AutoGenerateKeysAttributes autoGenerateKeysAttributes, AbstractDbConnector connector, DbConnection connection, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper) throws SQLException
query - QueryDefinition as a parameter groupautoGenerateKeysAttributes - an AutoGenerateKeysAttributes as a parameter groupconnector - the acting connectorconnection - the acting connectionStatementResultSQLException - if an error is producedpublic StatementResult update(QueryDefinition query, AutoGenerateKeysAttributes autoGenerateKeysAttributes, AbstractDbConnector connector, DbConnection connection, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper) throws SQLException
query - QueryDefinition as a parameter groupautoGenerateKeysAttributes - an AutoGenerateKeysAttributes as a parameter groupconnector - the acting connectorconnection - the acting connectionStatementResultSQLException - if an error is producedpublic int delete(QueryDefinition query, AbstractDbConnector connector, DbConnection connection, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper) throws SQLException
query - QueryDefinition as a parameter groupconnector - the acting connectorconnection - the acting connectionSQLException - if an error is producedpublic Map<String,Object> storedProcedure(StoredProcedureCall call, AutoGenerateKeysAttributes autoGenerateKeysAttributes, AbstractDbConnector connector, DbConnection connection, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper, org.mule.runtime.extension.api.runtime.operation.FlowListener flowListener) throws SQLException
When the stored procedure returns one or more ResultSet instances, streaming is automatically applied to avoid
preemptive consumption of such results, which may lead to performance and memory issues.
call - a StoredProcedureCall as a parameter groupconnector - the acting connectorconnection - the acting connectionMap with the procedure's outputSQLException - if an error is producedprotected Query resolveQuery(StoredProcedureCall call, AbstractDbConnector connector, DbConnection connection, org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper, QueryType... validTypes)
Copyright © 2021. All rights reserved.