Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Nodejs中的OriendDB聚乙二醇化_Node.js_Orientdb - Fatal编程技术网

Node.js Nodejs中的OriendDB聚乙二醇化

Node.js Nodejs中的OriendDB聚乙二醇化,node.js,orientdb,Node.js,Orientdb,使用oriento或orientjs npm库在Nodejs中设置分页偏移量和限制的最佳方法是什么?我通过查询生成器获取了一些顶点,如下所示: db.select() .from('some_class') .limit(20) .all() .then(function (results) { cb(results); }); 在这里,我可以把限制,但如何把抵消?在查询或查询生成器中进行分页都非常有用。使用skip()。要获取示例中的第二页,请执行以下操作: db

使用oriento或orientjs npm库在Nodejs中设置分页偏移量和限制的最佳方法是什么?我通过查询生成器获取了一些顶点,如下所示:

db.select()
  .from('some_class')
  .limit(20)
  .all()
  .then(function (results) {
    cb(results);
  });
在这里,我可以把限制,但如何把抵消?在查询或查询生成器中进行分页都非常有用。

使用skip()。要获取示例中的第二页,请执行以下操作:

db.select()
  .from('some_class')
  .skip(20)
  .limit(20)
  .all()
  .then(function (results) {
    cb(results);
 });

很好的解决方案,但这对于大型集群(约5000000条记录)来说并不有效。