我正在使用DataStax C#驱动程序将一行数据插入Cassandra数据库,我的示例代码如下:
var cluster = Cluster.Builder()
.AddContactPoints("localhost")
.Build();
using(cluster)
{
var connection = cluster.Connect();
connection.ChangeKeyspace("development");
var simple = connection.Prepare(@"INSERT INTO test(id,customer,content,created_at,line_ids) VALUES (uuid(), 'test customer', ?,'2014-10-24',?);");
var cmd = simple.Bind("content",new HashSet<Guid>{ Guid.NewGuid() });
var result = connection.Execute(cmd);
}
如何获取我插入的行的ID?