Trying to use Guid from C # as primary key in Cassandra

I am currently working on my NoSQL project, and I have two databases Cassandra and Redis (I use Redis for caching). Now, with Redis, I have one list, and I serialize my custom object using a DataContract, but when it comes to Cassandra, I'm afraid, because I'm trying to somehow insert a Guid into a Cassandra table, in which I use uuid as the primary the key. I searched the Internet, and all I could find was that Guid is the Cassandra uuid data type. I inserted uuid using now () in Cassandra, so I wonder if I can somehow call this now () with C #, or if I can somehow convert Guid to uuid. Any help or link is greatly appreciated. Thank.

+4
source share
1 answer

Per driver documentation is uuidalready displayed in Guidand back ... So you can just bind your variable to the appropriate placeholder in the statement .

+6
source

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


All Articles