Safe Interpolation with SQL Query in TypeScript
Does this look right? Is it not possible to do safe interpolation here?
${sql.and([
'sov.ordertype = 2',
days ? sql`NOW() - INTERVAL '${sql.unsafe(days.toString())} days' <= sov.OrderTime` : sql`TRUE`
])}