Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Add unique constraint to attributes #8

Open
meatballs opened this issue Jan 25, 2021 · 1 comment
Open

Add unique constraint to attributes #8

meatballs opened this issue Jan 25, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@meatballs
Copy link
Member

No description provided.

@meatballs
Copy link
Member Author

Rough outline :

Create a custom exception, UniqueConttaintException

Create a UniqueConstraint class which can be added to models similar to Attribute. It takes a list of attribute names which must be unique.

Create a unique_constraint table to hold current vales with the class attribute name as one column and another with the current values in use (a list of tuples)

Add to the save object function to check and maintain those values and raise the exception as necessary.

@meatballs meatballs added the enhancement New feature or request label Jun 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant