1
我在c#中使用Cassandra數據庫。我有一個用戶表,它具有TimeUuid
類型的UserId列。現在情況是我必須在第三方庫的方法中傳遞UserId作爲字符串參數。在這種方法中,我必須將此字符串轉換爲Cassandra.TimeUuid
。如何將字符串轉換爲C中的Cassandra.TimeUuid#
如何將此字符串轉換爲Cassandra.TimeUuid
?
感謝
我在c#中使用Cassandra數據庫。我有一個用戶表,它具有TimeUuid
類型的UserId列。現在情況是我必須在第三方庫的方法中傳遞UserId作爲字符串參數。在這種方法中,我必須將此字符串轉換爲Cassandra.TimeUuid
。如何將字符串轉換爲C中的Cassandra.TimeUuid#
如何將此字符串轉換爲Cassandra.TimeUuid
?
感謝
目前創建一個從字符串TimeUuid
實例的唯一方法就是要做到:
TimeUuid time = (TimeUuid) Guid.Parse(value);
得益於implicit conversion operator defined in TimeUuid
class。
這不是很直觀,所以我創建了一個ticket to expose TimeUuid.Parse()
method。