composite partition keys in cassandra

I have the following table:CREATE TABLE tab(userID varchar,grpID varchar,itemID varchar,timestamp bigint,PRIMARY KEY());I need to execute the following queries on this table, where:userID = xuserID = x and grpID = yuserID = x and grpID IN (a,b,c)Also, the results should be sorted by timestamp field in descending order, which makes timestamp as my clustering key.I want to avoid duplication of data or creating same table with 2 primary keys to achieve my queries.What should be my primary key now so that I should be able to execute all these queri...Read more

Composite Key functions in Hyperledger

I need to implement composite keys in hyperledger so that I could have a unique key based on the attributes put into the ledger. The function CreateCompositeKey(objectType string, attributes []string)(string,error)takes in objectType and attributes string. I couldnt find any examples of this online, how are the relevant attributes to be made into the composite key passed and in what way is the output given? So the way Composite keys should be used is make a key first and then push it to the blockchain with PutState(key string, value []byte) err...Read more