Cassandra更新列 [英] Cassandra update column

查看:420
本文介绍了Cassandra更新列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更新cassandra数据库中的列?

how can i update column in cassandra database??

columnfam{
  username{
    name:edds,
    surname:surname,
    email:mymail@rrr.com
  }
}

例如我需要更新姓氏

im使用php客户端PHPCASSA。

im using php client PHPCASSA.

thanx

推荐答案

如Octopus-Paul所说,更新与插入相同。在写作之前没有必要读。您只需这样做:

As Octopus-Paul says, updates are the same as inserts. There's no need to read before writing, though. You can just do this:

$column_family->insert('username', array('surname' => $new_surname));

这篇关于Cassandra更新列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆