我在cassandra中有一個非常簡單的表。
名稱:測試
列:從節點js在cassandra中插入BigInt
- ID(BIGINT,主鍵)
- 名(文本)
我試圖插入值到這一點使用的NodeJS(使用Cassandra的驅動程序)
client.execute("insert into test (id, name) values (?, ?)", [123, "dskddjls"], function (err, response) {
if (err) {
console.log("An error occured, ", err)
//...
}
else {
console.log("Added to table, ", response)
//...
}
})
插入成功完成,但是當我檢查我的cassandra數據庫時,看起來好像我爲大int整數的垃圾值lumn。
爲什麼發生這種情況的任何說明?
你可以嘗試顯式指定類型:'client.execute(」插入到測試(id,name)值(?,?)「,[123,」dskddjls「],{提示:[」bigint「,null]},函數(err,data){....})' –
@VsevolodGoloviznin是的,這個工程。那麼我們需要明確指定類型嗎? – Sachin