I have recently created a column family with CREATE TABLE
in cqlsh
console.
I have the following column family;
CREATE TABLE user (
id timeuuid PRIMARY KEY,
balance decimal,
is_free boolean,
player_id bigint,
)
I want to insert the following type of data;
{
"player_id": 104,
"balance": "0.00",
"is_free": false,
"bonus": "3+3+3"
}
when I do insert from cqlsh
console the insertion is the following;
INSERT INTO keyspace.user (player_id, balance,is_free,bonus, id)
VALUES (104,0.00,'3+3+3',67c5cb00-d814-11e2-9e13-59eb8e4538e5)
Id is generated by UUID::uuid1()->string
When I try to insert from cqlsh
, it gives no error. However, in phpcassa, it gives the following error :
Expected key 'ID' to be present in WHERE clause for 'users'
I already set the client's cql version to 3.0.0 by
$pool->get()->client->set_cql_version("3.0.0");
I already tried to insert timeuuid field like that '67c5cb00-d814-11e2-9e13-59eb8e4538e5'
By the way, the var_dump
of the variable $cql
that is executed is the following;
string 'INSERT INTO keyspace.user (player_id,balance,is_free,bonus,id) VALUES (104,0.00,false,'3+3+3','ca256040-d819-11e2-ae08-f78171d975c3')'
What is the problem here ?