当使用 Perl 模块Net::Cassandra::Easy与 Cassandra 交互时,我使用以下代码从column-family 中的col[123]
行中读取列:row[123]
Standard1
my $cassandra = Net::Cassandra::Easy->new(keyspace => 'Keyspace1', server => 'localhost');
$cassandra->connect();
my $result = $cassandra->get(['row1', 'row2', 'row3'], family => 'Standard1', byname => ['col1', 'col2', 'col3']);
这按预期工作。
但是,当尝试row1
使用 ..插入行时
$result = $cassandra->mutate(['row1'], family => 'Standard1', insertions => { "col1" => "Value to set." });
.. 我收到错误消息Can't use string ("0") as a SCALAR ref while "strict refs" in use at .../Net/GenThrift/Thrift/BinaryProtocol.pm line 376
。
我究竟做错了什么?