Reputation: 157
I was working on a project and couldn't help but notice that it uses two different execute methods to trigger a query execution:
1> session.execute()
2> cassandraTemplate.execute()
Could someone please explain the difference between the two?
Thanks!
Upvotes: 1
Views: 621
Reputation: 87224
You're confusing 2 things: session.execute
is the method from DataStax Java driver that execute raw CQL string or statements. The cassandraTemplate.execute
is the method from the Spring Data for Apache Cassandra that wraps DataStax Java driver and adds more functionality for better Spring integration - under the hood it uses session.execute
.
Upvotes: 2