4

I'm new in cassandra and I wanna get the values from a column family, where the key is a TimeUUIDType.

I'm using PHP with PHPCassa, and I can insert(set) correctly in the column family, generating uuid with the function:

$key = CassandraUtil::uuid1();

The problem happen when I try to do a get in the column family, because i have and uuid in String format( something like that):

$uuidString= "e2658820-69f2-11e1-af9a-95dd4f324d9";

I would like to know if is possible cast or transform an String form to a valid uuid for cassandra in php or phpcassa, because my purpose is in another page create the correct uuid from the $uuuidString.

Thanks.

Rodrigo Gauzmanf
  • 2,517
  • 1
  • 23
  • 26

1 Answers1

2

CassandraUtil::import($uuidString) will handle that.

Edit As of phpcassa 1.0+, \phpcassa\UUID::import() is the proper method.

Tyler Hobbs
  • 6,872
  • 24
  • 31
  • @user815672 you're welcome! If this works for you, don't forget to accept the answer so that others can know the question has been solved. – Tyler Hobbs Mar 17 '12 at 05:02