【问题标题】:How to implement pagination against mysql in vertx如何在vertx中实现对mysql的分页
【发布时间】:2019-01-06 20:11:57
【问题描述】:

我们以 JsonArray 的形式从 sql 查询返回结果集

SQLConnection connection = conn.result();
            connection.query(prepareQuery(filters.getString("limit"), filters.getString("since"), filters.getString("end"), filters.getString("filter")), res -> {

             ...
             handler.handle(Future.succeededFuture(arrayJs));
             connection.close();
}); ..

但是我们现在需要在其中实现分页。

在 Vertx 中最好的方法是什么?

【问题讨论】:

    标签: pagination mariadb vert.x mariasql


    【解决方案1】:

    Vert.x 不处理分页:您必须在 SQL 查询中处理它。

    Stackoverflow 上有使用 Oracle、SQLServer、MySQL、Postgres 等进行分页的示例。

    【讨论】:

      猜你喜欢
      • 2021-07-11
      • 2016-07-23
      • 2022-01-14
      • 1970-01-01
      • 2011-02-25
      • 2017-03-07
      • 2021-11-25
      • 2021-07-26
      • 1970-01-01
      相关资源
      最近更新 更多