Interface ReactiveSelectOperation
- All Known Subinterfaces:
ReactiveCassandraOperations, ReactiveFluentCassandraOperations
- All Known Implementing Classes:
ReactiveCassandraTemplate
public interface ReactiveSelectOperation
The
ReactiveSelectOperation interface allows creation and execution of Cassandra SELECT operations in
a fluent API style.
The starting domainType is used for mapping the Query provided via matching int the
Cassandra specific representation. By default, the originating domainType is also used for mapping back
the result from the Row. However, it is possible to define an different
returnType via as to mapping the result.
By default, the table to operate on is derived from the initial domainType and can be defined there via
the Table annotation. Using inTable allows a
developer to override the table name for the execution.
query(Human.class)
.inTable("star_wars")
.as(Jedi.class)
.matching(query(where("firstname").is("luke")))
.all();
- Since:
- 2.1
- Author:
- Mark Paluch, John Blum
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceTheReactiveSelectOperation.ReactiveSelectinterface provides methods for constructingSELECToperations in a fluent way.static interfaceResult type override (optional).static interfaceDefine aQueryused as the filter for theSELECT.static interfaceTable override (optional).static interfaceTriggerSELECTquery execution by calling one of the terminating methods returning result projections for count and exists projections.static interfaceTriggerSELECTexecution by calling one of the terminating methods.static interfaceTriggerSELECTquery execution by calling one of the terminating methods.static interfaceSelect query that is not yet associated with a result type. -
Method Summary
Modifier and TypeMethodDescriptionquery(com.datastax.oss.driver.api.core.cql.Statement<?> statement) Begin creating a CassandraSELECTquery operation for the givenStatement.Begin creating aSELECToperation for the givendomainType.Begin creating a CassandraSELECTquery operation for the givencql.
-
Method Details
-
query
Begin creating aSELECToperation for the givendomainType.- Type Parameters:
T-typeof the application domain object.- Parameters:
domainType-typeof the domain object to query; must not be null.- Returns:
- new instance of
ReactiveSelectOperation.ReactiveSelect. - Throws:
IllegalArgumentException- ifdomainTypeis null.- See Also:
-
query
Begin creating a CassandraSELECTquery operation for the givencql. The givencqlmust be aSELECTquery.- Parameters:
cql-SELECTstatement, must not be null.- Returns:
- new instance of
ReactiveSelectOperation.UntypedSelect. - Throws:
IllegalArgumentException- ifcqlis null.- Since:
- 5.0
- See Also:
-
query
ReactiveSelectOperation.UntypedSelect query(com.datastax.oss.driver.api.core.cql.Statement<?> statement) Begin creating a CassandraSELECTquery operation for the givenStatement. The givenStatementmust be aSELECTquery.- Parameters:
statement-SELECTstatement, must not be null.- Returns:
- new instance of
ReactiveSelectOperation.UntypedSelect. - Throws:
IllegalArgumentException- ifstatementis null.- Since:
- 5.0
- See Also:
-