Closed waji-io closed 3 months ago
Hi,
I am trying to build small SQL snippets/fragments following one of the example from the docs but I seem to be missing something.
Example
const example = sql`concat(first_name, ' ', last_name)`; console.log(JSON.stringify(example));
The resulting output is an empty object...
What I am trying to achieve is to dynamically generate a list of SQL fragments based on some input and apply them later to the actual query.
It's not an empty object. It's an instance of a class with with private properties. Stringifying it will not show anything but an empty object. There's no way for you to see what's inside it.
Hi,
I am trying to build small SQL snippets/fragments following one of the example from the docs but I seem to be missing something.
Example
The resulting output is an empty object...
What I am trying to achieve is to dynamically generate a list of SQL fragments based on some input and apply them later to the actual query.