We need to split the InterpolatorOps class for supporting a different kind set of operations depending on the statement type. The current code should be applied only to SelectStatement:
-- final class InterpolatorOps(tuple: (String, List[SerializableValueBy[Int]])) {
++ final class InterpolatorSelectOps(tuple: (String, SelectStatement, List[SerializableValueBy[Int]])) {
And then create new classes for the INSERT, DELETE and UPDATE operations with two operations, asFree and attempt, instead of asResultSet and attemptResultSet, potentially reusing the same logic:
This ticket depends on #98
We need to split the
InterpolatorOps
class for supporting a different kind set of operations depending on the statement type. The current code should be applied only toSelectStatement
:And then create new classes for the
INSERT
,DELETE
andUPDATE
operations with two operations,asFree
andattempt
, instead ofasResultSet
andattemptResultSet
, potentially reusing the same logic:Also, add the new cases on the test
InterpolatorImplicitSpec
: https://github.com/frees-io/freestyle-cassandra/blob/4bd76315aab0684417036a5911577cc3be0cd537/core/src/test/scala/query/interpolator/InterpolatorImplicitSpec.scala#L58-L170