Class CosmosQueryCreator
- java.lang.Object
-
- org.springframework.data.repository.query.parser.AbstractQueryCreator<CosmosQuery,Criteria>
-
- com.azure.spring.data.cosmos.repository.query.CosmosQueryCreator
-
public class CosmosQueryCreator extends org.springframework.data.repository.query.parser.AbstractQueryCreator<CosmosQuery,Criteria>
TODO: String based query, based on how cosmosDB provides. StringCosmosQuery class, How to bind values to the query. if CosmosDb already has binding capability, if not we would have to do it here in some creative way.query creator are associated with part tree queries,
-
-
Constructor Summary
Constructors Constructor Description CosmosQueryCreator(org.springframework.data.repository.query.parser.PartTree tree, CosmosParameterAccessor accessor, org.springframework.data.mapping.context.MappingContext<?,CosmosPersistentProperty> mappingContext)Creates a newCosmosQueryCreator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Criteriaand(org.springframework.data.repository.query.parser.Part part, Criteria base, Iterator<Object> parameters)protected CosmosQuerycomplete(Criteria criteria, org.springframework.data.domain.Sort sort)protected Criteriacreate(org.springframework.data.repository.query.parser.Part part, Iterator<Object> parameters)protected Criteriaor(Criteria base, Criteria criteria)
-
-
-
Constructor Detail
-
CosmosQueryCreator
public CosmosQueryCreator(org.springframework.data.repository.query.parser.PartTree tree, CosmosParameterAccessor accessor, org.springframework.data.mapping.context.MappingContext<?,CosmosPersistentProperty> mappingContext)Creates a newCosmosQueryCreator.CosmosParameterAccessoris used to hand actual parameter values into the callback methods as well as to apply dynamic sorting via aSortparameter.- Parameters:
tree- must not be null.accessor- must not be null.mappingContext- must not be null.
-
-
Method Detail
-
create
protected Criteria create(org.springframework.data.repository.query.parser.Part part, Iterator<Object> parameters)
- Specified by:
createin classorg.springframework.data.repository.query.parser.AbstractQueryCreator<CosmosQuery,Criteria>
-
and
protected Criteria and(@NonNull org.springframework.data.repository.query.parser.Part part, @NonNull Criteria base, @NonNull Iterator<Object> parameters)
- Specified by:
andin classorg.springframework.data.repository.query.parser.AbstractQueryCreator<CosmosQuery,Criteria>
-
or
protected Criteria or(@NonNull Criteria base, @NonNull Criteria criteria)
- Specified by:
orin classorg.springframework.data.repository.query.parser.AbstractQueryCreator<CosmosQuery,Criteria>
-
complete
protected CosmosQuery complete(@NonNull Criteria criteria, @NonNull org.springframework.data.domain.Sort sort)
- Specified by:
completein classorg.springframework.data.repository.query.parser.AbstractQueryCreator<CosmosQuery,Criteria>
-
-