Interface SqlPreparedQuery<E,R>

Type Parameters:
E - The entity type
R - The result type
All Superinterfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, io.micronaut.core.attr.AttributeHolder, BindableParametersPreparedQuery<E,R>, BindableParametersStoredQuery<E,R>, io.micronaut.core.naming.Named, io.micronaut.data.model.runtime.PagedQuery<E>, PersistentEntityAwareQuery<E>, io.micronaut.data.model.runtime.PreparedDataOperation<R>, io.micronaut.data.model.runtime.PreparedQuery<E,R>, SqlStoredQuery<E,R>, io.micronaut.data.model.runtime.StoredDataOperation<R>, io.micronaut.data.model.runtime.StoredQuery<E,R>
All Known Implementing Classes:
DefaultSqlPreparedQuery

@Internal public interface SqlPreparedQuery<E,R> extends BindableParametersPreparedQuery<E,R>, SqlStoredQuery<E,R>
SQL version of SqlStoredQuery. The instance of a prepared query has mutable state compared to a stored query.
Since:
3.5.0
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.micronaut.data.runtime.operations.internal.query.BindableParametersStoredQuery

    BindableParametersStoredQuery.Binder

    Nested classes/interfaces inherited from interface io.micronaut.data.model.runtime.StoredQuery

    io.micronaut.data.model.runtime.StoredQuery.OperationType
  • Field Summary

    Fields inherited from interface io.micronaut.core.annotation.AnnotationSource

    EMPTY
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    attachPageable(io.micronaut.data.model.Pageable pageable, boolean isSingleResult)
    Modify the query according to the pageable.
    io.micronaut.data.model.runtime.QueryResultInfo
     
    void
    prepare(E entity)
    Prepare query.

    Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider

    findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType

    Methods inherited from interface io.micronaut.core.annotation.AnnotationSource

    getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared

    Methods inherited from interface io.micronaut.core.attr.AttributeHolder

    getAttribute, getAttribute, getAttributes

    Methods inherited from interface io.micronaut.data.runtime.operations.internal.query.BindableParametersPreparedQuery

    bindParameters, bindParameters

    Methods inherited from interface io.micronaut.data.runtime.operations.internal.query.BindableParametersStoredQuery

    bindParameters

    Methods inherited from interface io.micronaut.core.naming.Named

    getName

    Methods inherited from interface io.micronaut.data.model.runtime.PagedQuery

    getPageable, getRootEntity

    Methods inherited from interface io.micronaut.data.runtime.operations.internal.query.PersistentEntityAwareQuery

    getPersistentEntity

    Methods inherited from interface io.micronaut.data.model.runtime.PreparedDataOperation

    getParameterInRole

    Methods inherited from interface io.micronaut.data.model.runtime.PreparedQuery

    getArguments, getParameterArray, getQueryHints, getRepositoryType, isRawQuery

    Methods inherited from interface io.micronaut.data.runtime.operations.internal.sql.SqlStoredQuery

    collectAutoPopulatedPreviousValues, getDialect, getQueryBuilder, isExpandableQuery

    Methods inherited from interface io.micronaut.data.model.runtime.StoredQuery

    getArgumentTypes, getEntityIdentifierType, getExpandableQueryParts, getJoinFetchPaths, getJoinPaths, getLimit, getOffset, getOperationType, getParameterExpressions, getQuery, getQueryBindings, getQueryHints, getResultArgument, getResultDataType, getResultType, getRootEntity, hasPageable, hasResultConsumer, isCount, isDtoProjection, isJsonEntity, isNative, isOptimisticLock, isProcedure, isSingleResult, useNumericPlaceholders
  • Method Details

    • prepare

      void prepare(@Nullable E entity)
      Prepare query. The internal SQL query can be altered based on the requirements.
      Parameters:
      entity - The entity instance
    • attachPageable

      void attachPageable(io.micronaut.data.model.Pageable pageable, boolean isSingleResult)
      Modify the query according to the pageable.
      Parameters:
      pageable - The pageable
      isSingleResult - is single result
    • getQueryResultInfo

      io.micronaut.data.model.runtime.QueryResultInfo getQueryResultInfo()
      Specified by:
      getQueryResultInfo in interface SqlStoredQuery<E,R>
      Returns:
      the query result info
      Since:
      4.0.0