Help with raw query

The following query is all raw. Is there a way to make SQL raw only the part of the
where
clause? (or still better a way to not use raw sql at all)

await dbConn.execute<User>(
  sql`select * from ${UserModel} where similarity("name", ${q}) > ${treshold}`
);
Was this page helpful?