Interface BulkFetchHandler

All Known Implementing Classes:
BulkFetchExistsHandler, BulkFetchJoinHandler

public interface BulkFetchHandler
Interface for a handler for "bulk fetch" of a multi-valued field from a query.
  • Method Details

    • getStatementToBulkFetchField

      IteratorStatement getStatementToBulkFetchField(org.datanucleus.metadata.AbstractClassMetaData candidateCmd, org.datanucleus.metadata.AbstractMemberMetaData mmd, org.datanucleus.store.query.Query query, Map parameters, RDBMSQueryCompilation datastoreCompilation, Set<String> mapperOptions)
      Method to return the bulk-fetch statement (and its associated mappings for extracting the results).
      Parameters:
      candidateCmd - Metadata for the candidate
      mmd - Metadata for the member we are bulk-fetching the value(s) for
      query - The query
      parameters - Parameters for the query
      datastoreCompilation - The datastore compilation of the query
      mapperOptions - Any mapper options for query generation
      Returns:
      The statement to use for bulk fetching, together with mappings for extracting the results of the elements
    • applyParametersToStatement

      static void applyParametersToStatement(org.datanucleus.ExecutionContext ec, PreparedStatement ps, RDBMSQueryCompilation datastoreCompilation, SQLStatement sqlStmt, Map parameters)
      Convenience method to apply the passed parameters to the provided bulk-fetch statement. Takes care of applying parameters across any UNIONs of elements.
      Parameters:
      ec - ExecutionContext
      ps - PreparedStatement
      datastoreCompilation - The datastore compilation for the query itself
      sqlStmt - The bulk-fetch iterator statement
      parameters - The map of parameters passed in to the query