Cassandra uses PHP SimpleCassie to get all keys

Is it possible to get all the keys in a column family using SimpleCassie? I looked at the google SimpleCassie code but don't understand.

Another problem is that I used the following code to access the column value.

$ price = $ cassie-> keyspace ('ToyStore') โ†’ cf ('Toys') โ†’ key ('Transformer') โ†’ column ('Price') โ†’ get ();

echo $ price;

He always complains that the cassandra columnorsupercolumn object cannot be converted to a string. Can I print a column value?

+4
source share
1 answer

You must use get_range_slices, start with "", and after each call use the last key as the start key in the next call (disclaimer: did not check this with SimpleCassie)

How to sort columns within a column family? LongType for the price?

The valid values โ€‹โ€‹of compare_with are (from cassandra.yaml): "AsciiType, UTF8Type, LexicalUUIDType, TimeUUIDType, LongType, and IntegerType (generic integer variable length type)

+1
source

Source: https://habr.com/ru/post/1341756/


All Articles