Interface PreparedStatementProvider

All Superinterfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.controller.ControllerService

public interface PreparedStatementProvider extends org.apache.nifi.controller.ControllerService
Controller service providing PreparedStatement and setting parameters in it.
  • Method Details

    • createPreparedStatement

      PreparedStatement createPreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con) throws SQLException
      Creates PreparedStatement with specified query and sets ids as string array parameter
      Parameters:
      query - SQL query
      context - NiFI ProcessContext to use
      ids - a collection of ids
      con - Connection to DB
      Returns:
      PreparedStatement
      Throws:
      SQLException
    • createPreparedStatement

      PreparedStatement createPreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con, DBElementType type) throws SQLException
      Creates PreparedStatement with specified query and sets ids as array parameter with specified element type.
      Parameters:
      query - SQL query
      context - NiFI ProcessContext to use
      ids - a collection of ids
      con - Connection to DB
      type - type of array element to convert to
      Returns:
      PreparedStatement
      Throws:
      SQLException
    • createPreparedStatement

      PreparedStatement createPreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con, int numberOfBinds, int bindsOffset) throws SQLException
      Creates PreparedStatement with specified query and sets ids as string array parameter specified number of times
      Parameters:
      query - SQL query
      context - NiFI ProcessContext to use
      ids - a collection of ids
      con - Connection to DB
      numberOfBinds - number of binds to add
      bindsOffset - offset for binds indexes
      Returns:
      PreparedStatement
      Throws:
      SQLException
    • createPreparedStatement

      PreparedStatement createPreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con, DBElementType type, int numberOfBinds, int bindsOffset) throws SQLException
      Creates PreparedStatement with specified query and sets ids as array parameter with specified element type specified number of times.
      Parameters:
      query - SQL query
      context - NiFI ProcessContext to use
      ids - a collection of ids
      con - Connection to DB
      type - type of array element to convert to
      numberOfBinds - number of binds to add
      bindsOffset - offset for binds indexes
      Returns:
      PreparedStatement
      Throws:
      SQLException