-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat(normalize-hash): Add support for normalizing hashes #110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @martijn-dev, this is great!
I left a couple of comments suggesting changes, the only required one would be the leftover console.log in dmmf.ts
.
Pull Request Test Coverage Report for Build 9660461861Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9660494463Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Pull Request Test Coverage Report for Build 9662361328Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9662382333Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9662247468Details
💛 - Coveralls |
This has been released in |
FYI, we've been using this feature for over a month in production now and we haven't faced any issues so far! |
Thanks for this feedback, I really appreciate it! I'll release a stable version along with #120 once it's merged. |
FYI this PR was just shipped in 1.6.0. |
What's changed:
?normalize
flag on the hash tag in the Prisma model.lowercase
,uppercase
,trim
,spaces
anddiacritics
sanitizing are supported. More could be added quite easy.Potential Risks / Breaking changes
unique
. I've added a disclaimer in the README.Text from the README:
You can normalize a hash before creation and querying. This might be useful in case you would like to find a User with the name of
François
with a query input offrancois
.There are several normalize options:
You can also combine the normalize options:
Questions?
Let me know what you think!
Always open to discussion. I hope you see this feature as a catalyst to expand support for searching in encrypted db values.
Cheers,
Martijn
Fixes #109