Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify columns programmatically within query clauses using phantom-dsl for cassandra

I need to create dynamic query clauses depending on user input, i.e. dynamically specifying the column within a query. All the examples are of the form

.where(_.id eqs myUuid)

however I need sth along the lines of

.where('id' eqs myUuid)

which is not possible. Is there any way to specify the columns of queries dynamically using phantom-dsl?

like image 243
sinel Avatar asked Nov 09 '22 18:11

sinel


1 Answers

Phantom does not allow for arbitrary models or wide rows, it's unfortunately not very realistic to be able to build an object model based on that. If you want wide rows, phantom won't be able to do much for you at this point in time, we are working hard to deliver a competitive solution there too but it's not easy, phantom's superpower comes from the object model and the autocompletion/typesafety/auto-migrations that result from that.

If you are simply worried about migrations and the ability to change structures on the fly and sync with Cassandra, we are releasing a very very advanced automated migration capability as part of phantom-pro, the commercial version of phantom.

like image 52
flavian Avatar answered Nov 14 '22 23:11

flavian