How to specify columns programmatically in sentences using phantom -dsl for cassandra

I need to create dynamic query suggestions depending on user input, i.e. dynamically indicate a column in the query. All examples are of the form

.where (_. id eqs myUuid)

however i need sth along the lines

.where ('id' eqs myUuid)

which is impossible. Is it possible to dynamically specify query columns using phantom -dsl?

+5
source share
1 answer

Phantom does not allow the use of arbitrary models or wide strings, but, unfortunately, it is not very realistic to be able to create based on the object model. If you need wide ranks, phantom won’t be able to do much for you at this point in time, we are working hard to offer a competitive solution there, but it’s not so easy, phantom superpower comes from the object model and autocomplete / security types / automatic migrations, which are the result of this.

If you are simply worried about migration and the ability to change structures on the fly and synchronize with Cassandra, we are releasing very advanced automatic migration features with phantom -pro , a commercial version of phantom.

+1
source

Source: https://habr.com/ru/post/1245082/


All Articles