feat(normalize-hash): Add support for normalizing hashes - #110
Merged
Conversation
franky47
requested changes
Jun 25, 2024
franky47
left a comment
Member
There was a problem hiding this comment.
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 |
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 |
Member
|
This has been released in |
Contributor
Author
|
FYI, we've been using this feature for over a month in production now and we haven't faced any issues so far! |
Member
|
Thanks for this feedback, I really appreciate it! I'll release a stable version along with #120 once it's merged. |
Member
|
FYI this PR was just shipped in 1.6.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed:
?normalizeflag on the hash tag in the Prisma model.lowercase,uppercase,trim,spacesanddiacriticssanitizing 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çoiswith 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