incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Nicolas Boulay Desjardins <jnbdzjn...@gmail.com>
Subject Problem with PHPCassa accessing Indexes
Date Tue, 28 Jun 2011 19:06:35 GMT
Hi,

I am having problem accessing data via an index with PHPCassa. I have
var_dump() the results:

array(6) { ["birthdate"]=> int(3546927995491989807) ["email"]=>
string(20) "jnbdzjnbdz@gmail.com" ["firstname"]=> string(12)
"Jean-Nicolas" ["lastname"]=> string(17) "Boulay Desjardins"
["password"]=> string(8) "password" ["username"]=> string(5) "jnbdz" }

object(cassandra_IndexExpression)#76 (3) { ["column_name"]=> string(5)
"email" ["op"]=> int(0) ["value"]=> string(20) "jnbdzjnbdz@gmail.com"
}

object(cassandra_IndexClause)#77 (3) { ["expressions"]=> array(1) {
[0]=> object(cassandra_IndexExpression)#76 (3) { ["column_name"]=>
string(5) "email" ["op"]=> int(0) ["value"]=> string(20)
"jnbdzjnbdz@gmail.com" } } ["start_key"]=> string(0) "" ["count"]=>
int(100) }

Here is the code:

$columnFamily = CASSANDRA::selectColumnFamily('Users');

                $this->selectUser = $columnFamily->get('jnbdz');

                var_dump($this->selectUser);

                echo '<br/>';
                echo '<br/>';

                $index_exp =
CassandraUtil::create_index_expression('email',
'jnbdzjnbdz@gmail.com');
var_dump($index_exp);
                $index_clause =
CassandraUtil::create_index_clause(array($index_exp));
echo '<br/>';
echo '<br/>';
var_dump($index_clause);
                $rows = $column_family->get_indexed_slices($index_clause);
echo '<br/>';
echo '<br/>';
var_dump($rows);
                var_dump($row);

Thanks in advance for any help

Mime
View raw message