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

Support compound primary keys #36

Closed
simonw opened this issue Jul 1, 2019 · 0 comments
Closed

Support compound primary keys #36

simonw opened this issue Jul 1, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Jul 1, 2019

This should work:

table = db["dog_breeds"].insert({
    "dog_id": 1,
    "breed_id": 2
}, pk=("dog_id", "breed_id"))

Needed for m2m work in #23

@simonw simonw added the enhancement New feature or request label Jul 1, 2019
@simonw simonw changed the title Handle compound primary keys Support compound primary keys Jul 1, 2019
This was referenced Jul 14, 2019
@simonw simonw closed this as completed in c65b67c Jul 15, 2019
simonw added a commit that referenced this issue Jul 24, 2019
* create_table now handles compound primary keys
* CLI now accepts multiple --pk for compound primary keys
* Docs for compound primary keys with CLI and Python library
* New .get() method plus documentation

Closes #36, closes #39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant