我仍然使用quarkus cassandra客户端 https://quarkus.io/guides/guides/guides/cassandra
我整天都在尝试完成Quarkus集成的分页,但该文档根本没有帮助。
这里的其他人有一个与Quarkus Cassandra客户分页的示例?
请与我分享您的知识。
提前致谢。
编辑:这个我的示例项目/游乐场: https://githbithub.com/Edward-fardward-farkhouri /Quarkus-Cassandra-playground
在这里,您可以找到一个工作示例。
我在此Cassandra文档中找到了一些东西:
并实施了偏置股票,但实际上并不是我正在寻找的...
I am still lost using the Quarkus Cassandra client https://quarkus.io/guides/cassandra
I am trying the whole day to get a pagination done with the quarkus integration but the documentation is not realy helpful at all.
Somebody else here has a working example for pagination with the Quarkus Cassandra client?
Please share your knowledge with me.
Thanks in advance.
EDIT: This my sample project/playground: https://github.com/edward-fakhouri/quarkus-cassandra-playground
Here you can find a working example.
I have found something in this cassandra documentation:
https://docs.datastax.com/en/developer/java-driver/3.1/manual/paging/
and implemented OffsetPagination but it isn't realy what I am searching for...
发布评论
评论(3)
使用最新的Cassandra Bom,您可以
使用Docker Cassandra开始工作这些测试,此后您的功能开始工作了
很长一段时间,所以我还补充说,
我也了解到Cassandra-Quarkus-test-frame-framework会带来Docker,但在情况您没有docker,您可以随时使用 cassandraunit 较轻的doight。所有代码均可找到
With the latest cassandra bom you can run those tests
with that docker cassandra started working, after that your function started working
I have been using querybuilder for a long time so I added that too
I understand cassandra-quarkus-test-framework brings docker but in case you dont have docker you can always use CassandraUnit which is lighter then docker. All code can be found here.
Quarkus Cassandra客户端有分页,但是我也无法像我想要的那样使其正常工作。在下面,您可以看到一个示例以获取分页态,其中包含Quarkus文档 https://quarkus.io/guides/guides /cassandra
这使用了mutinyMappedReactiverEsultSet,该群可以使您查询executionInfos。
我目前使用Quarkus实施的问题是,我需要两次查询Cassandra,以实际提供数据和分页。因此,我选择了这样的示例的准备好的陈述:
这是未经测试的代码,只是应该有效的一般概念。
There is pagination in the Quarkus Cassandra client however I can't make it work as I would like either. Below you see an example to get the pagination state with the example from the quarkus documentation https://quarkus.io/guides/cassandra
This uses the MutinyMappedReactiveResultSet which allows you to query the ExecutionInfos.
The problem I have at this moment using the quarkus implementation is that I need to query Cassandra twice to actually provide the data and the pagination with it. Therefore I opted for a prepared statement like this example:
This is untested code, just the general concept which should work.
因此,在我的反对和我的研究中,与Quarkus cassandra客户在Cassandra数据库上进行分页没有令人信服的方法。您必须自己处理。
So, in my oppinion and my research, there is no convinient way to do pagination on a cassandra database with the quarkus cassandra client. You have to handle it by yourself.