What type of C # is equivalent to timeuuid in a Datastax Cassandra C # driver?
I am writing a simple user tracking service and want to access the latest user history. I am trying to create a table equivalent to this create statement:
CREATE TABLE IF NOT EXISTS user_history (
user_id text,
event_type text,
create_date timeuuid,
item_id text,
PRIMARY KEY ((user_id, event_type), create_date)
);
I made the following class:
[AllowFiltering]
[Table("user_history")]
public class UserHistory
{
[PartitionKey(1)]
[Column("user_id")]
public string UserID;
[PartitionKey(2)]
[Column("event_type")]
public string EventType;
[ClusteringKey(1)]
[Column("create_date")]
public DateTime CreateDate { get; set; }
[Column("item_id")]
public string ItemID;
}
And I use this operator to create a table in Cassandra:
var table = Session.GetTable<UserHistory>();
table.CreateIfNotExists();
But this gives me the following table:
CREATE TABLE user_history (
user_id text,
event_type text,
create_date timestamp,
item_id text,
PRIMARY KEY ((user_id, event_type), create_date)
)
As you can see, the type create_dateis equal timestampinstead timeuuid.
I tried Guidinstead DateTime, but it gives me uuidwhen I call .CreateIfNotExists().
Guid DateTime CreateDate CQL3? , timeuuid / ( GuidGenerator, FluentCassandra)?! (: Datastax)