Closed spartanhooah closed 5 months ago
Not quite sure what you're referring to as ReactiveCqlOperations
declares execute(String cql, Object... args)
on its interface. Most CqlTemplate
methods define overloads accepting either Statement
or CQL with a varargs parameter for CQL arguments.
Ah, I think I see my misunderstanding. I thought ReactiveCassandraTemplate
was related to ReactiveCqlTemplate
, but that's evidently not the case. I think I was jumping between the "Persisting Entities" and "CQL Template API" sections and didn't realize they use different classes/interfaces for their examples. Is there an explanation of when one would want to use the CQL vs. Cassandra templates that I overlooked?
Thanks for sharing your thoughts. There's indeed a separation between CQL and entity-oriented operations. The CQL Template provides a foundation for CQL-centric operations, similar to Spring's JdbcTemplate
while the CassandraTemplate
is entity-centric.
We had in an older iteration of the documentation a chapter providing guidance on CqlTemplate
vs CassandraTemplate
. The current documentation is missing these snippets, however we reinstated the documentation via #1475.
The documentation for INSERT, UPDATE, and DELETE has a varargs version of
ReactiveCassandraTemplate#execute
, but according to the Javadoc there is only one version of that method and it takes acom.datastax.oss.driver.api.core.cql.Statement
.