Closed arcziby closed 2 years ago
I just wrote a test case for this and it appears to work: https://app.circleci.com/pipelines/github/generalpiston/typeorm-encrypted/28/workflows/9d036039-a719-42c8-bf81-fc06d012107a/jobs/55.
What does your data look like? How are you adding records?
Take a peek at the test cases to see examples of how to use this library: https://github.com/generalpiston/typeorm-encrypted/tree/c3119c043a9b4d1796544196b397d5f1ed4f6488/test
Could you please write test case where you select data with conditional where
and pass simple (no encrypted) value, for example i have encrypted emails in database but i'd like select user by email SELECT user WHERE user.email = 'a@a.eu'
Ahh... I see... I don't think we can handle that case. Unfortunately, typeorm lets you use transformers for storing and fetching columns, but not filtering (or other more complicated SQL).
See https://github.com/generalpiston/typeorm-encrypted/#why-wont-complex-queries-work.
Sorry man :(
ok, so maybe you can add new tool for encrypt some value and later i just const encryptedemail = encrypt(email); SELECT user WHERE user.email = encryptedemail
It doesn't work when i want to get value by QueryBuilder