You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 4, 2020. It is now read-only.
With 1.0.a.5, given a CF with a two part primary key, an insert of an integer column value appears to add the value as a string as reported by a CQL3 select, whereas a CQL insert adds as an integer. If the primary key is on the first column only, an insert of an integer works as expected. Code to reproduce with example output follows, with apologies if this is a user error on my part:
select \* from test;
k1 | k2 | val
------+----+-------
aKey | 33 | 12345
- After running script:
*
cqlsh:KS> select \* from test;
k1 | k2 | val
--------+----+---------
aKey | 33 | 12345
theKey | 42 | '12345'
Failed to decode value '12345' (for column 'val') as Int32Type: unpack requires a string argument of length 4
*/
ini_set('display_errors', 'on');
include_once('/usr/local/src/phpcassa-1.0.a.5/lib/autoload.php');
use phpcassa\Connection\ConnectionPool;
use phpcassa\ColumnFamily;
use phpcassa\SystemManager;
$sys = new SystemManager('127.0.0.1');
$pool = new ConnectionPool('KS', array('127.0.0.1'));
$cf = new ColumnFamily($pool, 'test');
$cf->insert_format = ColumnFamily::ARRAY_FORMAT;
$cf->return_format = ColumnFamily::ARRAY_FORMAT;
$key = 'theKey';
$cols = array(
array(array(42, 'val'), 12345)
);
$cf->insert($key, $cols);