Open dvv opened 6 months ago
Given
const data = { name: "foo" }
The following
with cf as (insert into app.custom_field as cf ${sql(data)} returning cf) ...
is translated to
with cf as (insert into app.custom_field as cf $1 as \"name\" returning cf) ...
while I expect vanilla insert-like expansion like
with cf as (insert into app.custom_field as cf (name)values($1) returning cf) ...
Traces led to as cf token forces the statement to be treated as "select" builder, not "insert" one.
as cf
Please consider fixing or pointing out how to gracefully work this around.
Given
The following
is translated to
while I expect vanilla insert-like expansion like
Traces led to
as cf
token forces the statement to be treated as "select" builder, not "insert" one.Please consider fixing or pointing out how to gracefully work this around.