我正在尝试使用以下代码使用nodejs cassandra-client 创建一个键空间-
var System = require('cassandra-client').System;
var sys = new System('127.0.0.1:9160');
sys.addKeyspace(ksDef, function(err) {
if (err) {
// there was a problem creating the keyspace.
} else {
// keyspace was successfully created.
}
});
Run Code Online (Sandbox Code Playgroud)
但我收到错误“ksDef 未定义”。请给我使用 cassandra-client 创建键空间的解决方案。什么是ksDef?如何定义ksDef?参考--url= https://github.com/racker/node-cassandra-client
谢谢苏布拉
cassandra ×1