You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by lisek <m....@powerprice.pl> on 2010/08/12 15:49:26 UTC
how to retrieve data from supercolumns by phpcassa ?
Hi all,
I've got cassandra superlcolumn looking like that:
<ColumnFamily Name="users" CompareWith="TimeUUIDType"
ColumnType="Super" CompareSubcolumnsWith="BytesType" />
now in this columnfamily I've inserted something like that:
["client"] => array(1) {
["2a3909c0-a612-11df-b27e-346336336631"]=>
array(3) {
["add_date"]=>
string(10) "1281618279"
["lastname"]=>
string(8) "blablabla"
["name"]=>
string(6) "myname"
}
}
my question is, how to get from "client" this one "2a3909c0-a612-11df-
b27e-346336336631" column? I was tryin to get->('client', '2a3909c0-
a612-11df-b27e-346336336631') - but with no results... maybe I should
convert this "2a3909c0-a612-11df-b27e-346336336631" somehow before I
put it to get() ?
or maybe I'm thinking wrong way...
regards
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/how-to-retrieve-data-from-supercolumns-by-phpcassa-tp5416141p5416141.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
Re: SV: how to retrieve data from supercolumns by phpcassa ?
Posted by lisek <m....@powerprice.pl>.
Thanks Justus,
I'll check it
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/how-to-retrieve-data-from-supercolumns-by-phpcassa-tp5416141p5419536.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
SV: how to retrieve data from supercolumns by phpcassa ?
Posted by Thorvaldsson Justus <ju...@svenskaspel.se>.
I don't use php so I don't know the method but
http://wiki.apache.org/cassandra/API
"get
ColumnOrSuperColumn get(string keyspace, string key, ColumnPath column_path, ConsistencyLevel consistency_level)
Get the Column or SuperColumn at the given column_path. If no value is present, NotFoundException is thrown. (This is the only method that can throw an exception under non-failure conditions.)
"
So don't use get if you want to specify a super column.
"get_slice
list<ColumnOrSuperColumn> get_slice(string keyspace, string key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
Get the group of columns contained by column_parent (either a ColumnFamily name or a ColumnFamily/SuperColumn name pair) specified by the given SlicePredicate struct."
Is one way to do what you want. How this works in php I don't know but should be similar.
/Justus
-----Ursprungligt meddelande-----
Från: lisek [mailto:m.lisowski@powerprice.pl]
Skickat: den 12 augusti 2010 15:49
Till: cassandra-user@incubator.apache.org
Ämne: how to retrieve data from supercolumns by phpcassa ?
Hi all,
I've got cassandra superlcolumn looking like that:
<ColumnFamily Name="users" CompareWith="TimeUUIDType"
ColumnType="Super" CompareSubcolumnsWith="BytesType" />
now in this columnfamily I've inserted something like that:
["client"] => array(1) {
["2a3909c0-a612-11df-b27e-346336336631"]=>
array(3) {
["add_date"]=>
string(10) "1281618279"
["lastname"]=>
string(8) "blablabla"
["name"]=>
string(6) "myname"
}
}
my question is, how to get from "client" this one "2a3909c0-a612-11df-
b27e-346336336631" column? I was tryin to get->('client', '2a3909c0-
a612-11df-b27e-346336336631') - but with no results... maybe I should
convert this "2a3909c0-a612-11df-b27e-346336336631" somehow before I
put it to get() ?
or maybe I'm thinking wrong way...
regards
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/how-to-retrieve-data-from-supercolumns-by-phpcassa-tp5416141p5416141.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
Re: how to retrieve data from supercolumns by phpcassa ?
Posted by Sasha Dolgy <sd...@gmail.com>.
you'll find a response to this question on the phpcassa mailing list ...
where you asked the same question.
-sd
On Wed, Jun 8, 2011 at 10:22 AM, amrita <am...@gmail.com> wrote:
> Hi,
> Can u please tell me how to create a supercolumn and retrieve data from it
> using
> phpcassa???
>
> student_details{<id>{<sid>,<lesson_id>,<answers>{<time_expired>,<answer_opted>}}}
>
Re: how to retrieve data from supercolumns by phpcassa ?
Posted by amrita <am...@gmail.com>.
Hi,
Can u please tell me how to create a supercolumn and retrieve data from it using
phpcassa???
student_details{<id>{<sid>,<lesson_id>,<answers>{<time_expired>,<answer_opted>}}}
Re: how to retrieve data from supercolumns by phpcassa ?
Posted by lisek <m....@powerprice.pl>.
Ok I deal with it. There was a bug in phpcassa and now I can make it that
way:
get->('client', UUID::convert('2a3909c0-a612-11df-b27e-346336336631',
UUID::FMT_STRING, UUID::FMT_BINARY))
If someone is using phpcassa and want to make it work, please give me a sign
and I'll post the solution.
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/how-to-retrieve-data-from-supercolumns-by-phpcassa-tp5416141p5419803.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.