-
Notifications
You must be signed in to change notification settings - Fork 5
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
Enforce unique
for keys
#4
Comments
What do you mean by this? |
@lilnasy This is basically when we mark keys as unique with the {
id: z.string().uuid().describe("primary, unique"),
email: z.string().describe("unique")
} We need to enforce that we're not allowed to create any items with existing values or update any items that break the |
what's your definition of |
@jnssnmrcs You bring up a good point in the implementation of the secondary key indexing, not sure how it should be implemented so that an indexed key doesn't have to be unique, without adding too much extra complexity to the implementation... Edit: Will open a new issue for this |
Yea I think treating all indexes as unique is wrong. I was just reading up about the differences and came across this answer on stackoverflow which explained how it works in MySQL: https://stackoverflow.com/a/708508/8952488 It also feels superfluous to say that a primary is also unique (like you do in most examples), since a primary index is always unique. |
No description provided.
The text was updated successfully, but these errors were encountered: