• 客户端缓存总条数 , 即,skip ==0 时,才查总条数, skip !=0 时, 返回 total = -1。 total == -1 表示客户端使用之前的数据总条数。
  • 在skip ==0 时,如果查询的分页数量量小于 take 数, 不必查总条数。

代码表示:

    var listData = 分页查询的数据。
    var total = -1;
     if( skip == 0 ){
         if(   listData.size < take ){    
            total = listData.size;
        }
        else{
            total = 从数据库查询总条数。
        }
    }

相关文章:

  • 2021-07-28
  • 2021-07-14
  • 2021-07-24
  • 2021-04-18
  • 2021-11-05
猜你喜欢
  • 2022-03-09
  • 2021-08-03
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2021-12-26
  • 2021-07-30
相关资源
相似解决方案