-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 for unique columns #728
Comments
Can work on a PR if feature request is approved. |
Hi @hirokiosame There is this good proposal on stackoverflow on how to enforce unique fields and produce a conflict which can be handled if the same value is used. I do not think there is a good way to generally solve this, so just creating a |
Interesting case. Thanks for the info. So, even adding a hook to pre-insert to check if the row already exists wouldn't cut it huh? Is it possible to implement a soft-unique feature with the caveat of not being unique when the database is configured to sync? In my case, I am not syncing my rxdb instance. |
@hirokiosame |
Case
Feature request
Request
I understand a pre hook can be made but would be nice if there is a
unique: true
or a compound unique array in the schema.The text was updated successfully, but these errors were encountered: