Currently, I am attempting to query a specific column in an SQL database using Typescript with an endsWith condition.
const tracking_code = '65432'
repo.findValidOne({ where: { tracking_code }});
I aim to modify the query so that the tracking_code
value ends with the available code's tracking value.
The corresponding SQL query would be:
SELECT *
FROM repo
WHERE tracking_code LIKE '%65432'
LIMIT 1;
Although I have experimented with raw queries, they do not provide the desired outcome.