Closed
Description
Consider the code:
const fields = {
name: 'John Doe',
created_at: ...
};
await sql`
INSERT INTO users ${sql(fields)}
`;
What would I use for created_at
to send NOW()
?
I know I could probably use the following, but my hope is to keep the SQL compact with the dynamic query helper:
await sql`
INSERT INTO users (
name,
created_at
) VALUES (
${fields.name},
NOW()
)
`;