thobbs / phpcassa

PHP client library for Apache Cassandra
thobbs.github.com/phpcassa
MIT License
248 stars 78 forks source link

get_range() won't return more than 100 records. #100

Closed sarral closed 12 years ago

sarral commented 12 years ago

Initialize with this: $this->rCF_rep = new ColumnFamily($this->rCONN, self::CF_rep,TRUE,TRUE,1,1,5000);

Call, trying to set again: $this->rCF_rep->get_range($sREP, $eREP, 60000,null,null,null,5000);

I only get 100 records.

Using cassandra-cli: I have 502 records.

sarral commented 12 years ago

I was able to get ALL columns by using a slice. Luckily what I'm storing I can figure out my slice without looking at the data.

$slice = new ColumnSlice($sip,$eip,50000);
return $this->Obj2Array( $this->rCF_rep->get_range($sREP,$eREP,60000,$slice) );

In the original call above, no slice (Passing: row_count AND buffer_size) didn't do anything about the number of Columns returned.

thobbs commented 12 years ago

Looks like you figured this out, but your original call was just passing an integer instead of a ColumnSlice object, which is the correct way to do this in phpcassa 1.0.x.