Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to composite partition keys in StorageDict #166

Open
yolandab opened this issue Mar 15, 2018 · 0 comments
Open

Add support to composite partition keys in StorageDict #166

yolandab opened this issue Mar 15, 2018 · 0 comments
Assignees

Comments

@yolandab
Copy link
Collaborator

yolandab commented Mar 15, 2018

Extend the data models that can be specified with Hecuba to support composite partition keys. Until now the attributes that compound a primary keys are specified between <>: the first attribute is considered the partition key and the rest are clustering keys:

class mydict(StorageDict):
'''
@TypeSpec <<attr1,attr2,attr3>, attr4, attr5> # attr1 is the partition key, and attr2 and attr3 are clustering keys
'''

From now on, several attributes can compound the partition key if they are separated by ":":

class mydict(StorageDict):
'''
@TypeSpec <<<attr1,attr2>,attr3,attr4>, attr5, attr6> # attr1 and attr2 are the composite partition key, and attr3 and attr4 are clustering keys
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants