0

如何在查询之前检查给定的 timeuuid 即 fa6e9e80-299c-11e7-98d8-f7a8744353f3 是否是有效的 timeuuid?

使用稍微不同但仍然正确的格式 timeuuid: fa6e9e80-299c-11e7-98d8-f7a8744353av 会导致错误:

object(Cassandra\Exception\InvalidSyntaxException)#199 (7) { ["message":protected]=> string(54) "line 1:103 mismatched character 'v' expecting set null"

Cassandra PHP 驱动程序文档似乎没有提供有效的检查功能。( https://datastax.github.io/php-driver/api/Cassandra/ )

4

1 回答 1

0

version()使用方法检查 uuid 的版本。如果为 1,则为 timeuuid。

https://datastax.github.io/php-driver/api/Cassandra/interface.UuidInterface/#method-version

于 2017-04-25T10:41:28.787 回答