How to insert an array of objects (bulk-insert) into neo4j with bolt protocol (javascript)

我们两清 提交于 2019-12-05 05:59:42

In step 3, you can pass your entire input list (from step 1) as a parameter. (However, if the input list is very long, you should split it into smaller batches -- say of 10,000 items each.)

For example:

session
  .run(
    "UNWIND {list} AS i CREATE (:Record {id: i.id, title: i.title})",
    { list: list })
  .then(function(result){

    // Use the result ...

    session.close();
  })
  .catch(function(error) {
    console.log(error);
  });
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!