exists

9 views
Skip to first unread message

Lu Ali

unread,
Apr 11, 2013, 7:32:44 AM4/11/13
to pycassa...@googlegroups.com
hello,
pretty simple question for today. Is there a way to check if a key exists in cf? we actually dont want any colums to be returned.
Cheers
Lu

Hanno Schlichting

unread,
Apr 11, 2013, 7:42:42 AM4/11/13
to pycassa...@googlegroups.com
On Thu, Apr 11, 2013 at 1:32 PM, Lu Ali <ali.l...@gmail.com> wrote:
> pretty simple question for today. Is there a way to check if a key exists in
> cf? we actually dont want any colums to be returned.

You could use the get_count API [1] and specify a max_count of 1.

Hanno

[1] http://pycassa.github.io/pycassa/api/pycassa/columnfamily.html#pycassa.columnfamily.ColumnFamily.get_count
Reply all
Reply to author
Forward
0 new messages