Class SqlQueryExecutor
java.lang.Object
com.evolveum.midpoint.repo.sqlbase.SqlQueryExecutor
Component just under the service that orchestrates query transformation and execution.
Sql query executor itself does hold the query state, it uses
SqlQueryContext for that.
This object manages configuration information and provides dataSource/connections for queries.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<S,Q extends FlexibleRelationalPathBase<R>, R>
intcount(@NotNull SqlQueryContext<S, Q, R> context, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options) <S,Q extends FlexibleRelationalPathBase<R>, R>
@NotNull SearchResultList<S>list(@NotNull SqlQueryContext<S, Q, R> context, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options) <S,Q extends FlexibleRelationalPathBase<R>, R>
intlistStreaming(@NotNull SqlQueryContext<S, Q, R> context, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, @NotNull ObjectHandler<S> handler, @NotNull OperationResult operationResult, int fetchSize) Streaming iterative search that processes rows one by one without loading all into memory.
-
Constructor Details
-
SqlQueryExecutor
-
-
Method Details
-
count
public <S,Q extends FlexibleRelationalPathBase<R>, int countR> (@NotNull @NotNull SqlQueryContext<S, Q, throws RepositoryExceptionR> context, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options) - Throws:
RepositoryException
-
list
@NotNull public <S,Q extends FlexibleRelationalPathBase<R>, @NotNull SearchResultList<S> listR> (@NotNull @NotNull SqlQueryContext<S, Q, throws RepositoryException, SchemaExceptionR> context, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options) - Throws:
RepositoryExceptionSchemaException
-
listStreaming
public <S,Q extends FlexibleRelationalPathBase<R>, int listStreamingR> (@NotNull @NotNull SqlQueryContext<S, Q, throws RepositoryException, SchemaExceptionR> context, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, @NotNull @NotNull ObjectHandler<S> handler, @NotNull @NotNull OperationResult operationResult, int fetchSize) Streaming iterative search that processes rows one by one without loading all into memory. Uses JDBC cursor-based streaming with configurable fetch size.- Parameters:
context- query contextquery- object query (may be null)options- get operation optionshandler- handler called for each transformed resultoperationResult- operation result for handlerfetchSize- JDBC fetch size for streaming- Returns:
- number of processed items
- Throws:
RepositoryExceptionSchemaException
-