Support TOKEN function for partition keys. At least basic operators(=,<,>)
See original GitHub issue@doanduyhai hi! appreciate your work
Can’t find how can i use Cassandra native TOKEN function for partition keys(and maybe for clustering too). For example i need to build select statement like this(https://docs.datastax.com/en/cql/3.1/cql/cql_using/paging_c.html):
SELECT * FROM customers WHERE TOKEN(id) > TOKEN(a98d0f15-aad2-4a50-94b6-8aa4e2ede079);
But i see only 3 available options in DSL:
customerManager.dsl().select().allColumns_FromBaseTable().where().id().Eq()
customerManager.dsl().select().allColumns_FromBaseTable().where().id().Eq_FromJson()
customerManager.dsl().select().allColumns_FromBaseTable().where().id().IN()
We have 2 options here:
- Add Token call as different Relation:
customerManager.dsl().select().allColumns_FromBaseTable().where().idToken().Eq()
customerManager.dsl().select().allColumns_FromBaseTable().where().idToken().Gt()
...
- Add “token” method to “id” relation:
customerManager.dsl().select().allColumns_FromBaseTable().where().id().token().Eq()
customerManager.dsl().select().allColumns_FromBaseTable().where().id().token().Gt()
...
@doanduyhai can you point me out to class where i can implement it? Is it SelectWhereDSLCodeGen class? And what is the best option to do it?
Issue Analytics
- State:
- Created 7 years ago
- Comments:21 (10 by maintainers)
Top Results From Across the Web
A deep look at the CQL WHERE clause - DataStax
The partition key columns support only two operators: = and IN ... operator on the partition key through the use of the token...
Read more >Subject Mapping and Partitioning - NATS Docs
Deterministic token partitioning allows you to use subject based addressing to deterministically divide (partition) a flow of messages where one ...
Read more >Data Manipulation | ScyllaDB Docs
When specifying relations, the TOKEN function can be used on the PARTITION KEY column to query. In that case, rows will be selected...
Read more >SQL query metrics for Azure Cosmos DB for NoSQL
When a partition reaches its storage size, the service seamlessly splits the partition into two new partitions, and divides the partition key ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So I need to add support for GROUP BY clause recently available in latest Cassandra version and after that we’re good for another release
There is also a project to write a comprehensive contributor guide that explains all the internal architecture of Achilles so that makes life easier for external contributors.
So here is my first attempt. Need to finish a lot from your guide above. But i’m on the right way
Here is my entity: