public class StringBasedR2dbcQuery extends AbstractR2dbcQuery
StringBasedR2dbcQuery
implementation.
A StringBasedR2dbcQuery
expects a query method to be annotated with Query
with a SQL query. Supports
named parameters (if enabled on DatabaseClient
) and SpEL expressions enclosed with :#{…}
.
Constructor and Description |
---|
StringBasedR2dbcQuery(R2dbcQueryMethod queryMethod,
R2dbcEntityOperations entityOperations,
R2dbcConverter converter,
ReactiveDataAccessStrategy dataAccessStrategy,
ExpressionParser expressionParser,
ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider)
Creates a new
StringBasedR2dbcQuery for the given StringBasedR2dbcQuery , DatabaseClient ,
SpelExpressionParser , and QueryMethodEvaluationContextProvider . |
StringBasedR2dbcQuery(String query,
R2dbcQueryMethod method,
R2dbcEntityOperations entityOperations,
R2dbcConverter converter,
ReactiveDataAccessStrategy dataAccessStrategy,
ExpressionParser expressionParser,
ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider)
Create a new
StringBasedR2dbcQuery for the given query , R2dbcQueryMethod ,
DatabaseClient , SpelExpressionParser , and QueryMethodEvaluationContextProvider . |
Modifier and Type | Method and Description |
---|---|
protected reactor.core.publisher.Mono<PreparedOperation<?>> |
createQuery(org.springframework.data.relational.repository.query.RelationalParameterAccessor accessor)
Creates a
BindableQuery instance using the given ParameterAccessor |
protected boolean |
isCountQuery()
Returns whether the query should get a count projection applied.
|
protected boolean |
isExistsQuery()
Returns whether the query should get an exists projection applied.
|
protected boolean |
isModifyingQuery()
Returns whether this query is a modifying one.
|
String |
toString() |
execute, getQueryMethod
public StringBasedR2dbcQuery(R2dbcQueryMethod queryMethod, R2dbcEntityOperations entityOperations, R2dbcConverter converter, ReactiveDataAccessStrategy dataAccessStrategy, ExpressionParser expressionParser, ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider)
StringBasedR2dbcQuery
for the given StringBasedR2dbcQuery
, DatabaseClient
,
SpelExpressionParser
, and QueryMethodEvaluationContextProvider
.queryMethod
- must not be null.entityOperations
- must not be null.converter
- must not be null.dataAccessStrategy
- must not be null.expressionParser
- must not be null.evaluationContextProvider
- must not be null.public StringBasedR2dbcQuery(String query, R2dbcQueryMethod method, R2dbcEntityOperations entityOperations, R2dbcConverter converter, ReactiveDataAccessStrategy dataAccessStrategy, ExpressionParser expressionParser, ReactiveQueryMethodEvaluationContextProvider evaluationContextProvider)
StringBasedR2dbcQuery
for the given query
, R2dbcQueryMethod
,
DatabaseClient
, SpelExpressionParser
, and QueryMethodEvaluationContextProvider
.method
- must not be null.entityOperations
- must not be null.converter
- must not be null.dataAccessStrategy
- must not be null.expressionParser
- must not be null.evaluationContextProvider
- must not be null.protected boolean isModifyingQuery()
AbstractR2dbcQuery
isModifyingQuery
in class AbstractR2dbcQuery
protected boolean isCountQuery()
AbstractR2dbcQuery
isCountQuery
in class AbstractR2dbcQuery
protected boolean isExistsQuery()
AbstractR2dbcQuery
isExistsQuery
in class AbstractR2dbcQuery
protected reactor.core.publisher.Mono<PreparedOperation<?>> createQuery(org.springframework.data.relational.repository.query.RelationalParameterAccessor accessor)
AbstractR2dbcQuery
BindableQuery
instance using the given ParameterAccessor
createQuery
in class AbstractR2dbcQuery
accessor
- must not be null.BindableQuery
.Copyright © 2018–2022 Pivotal Software, Inc.. All rights reserved.