我使用 Cassandra 和 Node.js 来通过 everyRow 获取大表。
我需要在每一行上插入数据,但由于某种原因,它没有等待查询并且在完成之前完成。
client.eachRow(query, [], { prepare: true, autoPage : true, fetchSize: 500 }, function(index, row) {
// DB query / insert or update
, function(err, result) {
// Finish all rows.
});
Run Code Online (Sandbox Code Playgroud)
有什么建议么?
cassandra node.js datastax-enterprise datastax datastax-node-driver