How do I convert a SQL query for Sequelize with join condition encryption

Viewed 14

I have a SQL query (using mysql as DB) that I now need to rewrite as a sequelize.js query in node js.

SQL Query:

SELECT f.column_1
FROM table1 f
LEFT OUTER JOIN table2 p ON
p.column = (CAST(AES_DECRYPT(UNHEX(hex(from_base64(f.column))), 12344) AS CHAR(50))

here f.column is encrypted so that it can match with p.column

How to achieve the same in sequelize ?

0 Answers
Related