문제

I couldn't find any example/article about working with inline variables in cql.

Basically my structure is like this;

1 Keyspace(x)
2 Tables (a,b)

I have to select result from x.a to code first and then send them to x.b

As you can see i have to go CAS 2 times. But i can do it with single query.

any way to declare and work with inline variables?

thanks already.

도움이 되었습니까?

해결책

You don't say what client driver you are using, but any modern CQL driver should support Bound Statements, which is how you would paramaterize your queries.

You can't do a dependent query like that on two tables in a single round trip. The second one will have to be executed by your client code after you get the result from the first.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top