Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic updates with table aliases #974

Open
willruggiano opened this issue Oct 30, 2024 · 0 comments
Open

Dynamic updates with table aliases #974

willruggiano opened this issue Oct 30, 2024 · 0 comments

Comments

@willruggiano
Copy link

await sql`
  UPDATE foo AS f
  SET ${sql({ bar: sql`now()` }, ["bar"])}
`;

expected;

update foo as f
set bar = now()

actual:

update foo as f
set now() as "bar"

Removing the alias does the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant