Question/typo for insert example in tutorial
chris-martin opened this issue · comments
Chris Martin commented
Why does id
get set to DEFAULT
in this query?
tomjaguarpaw commented
Good catch. It doesn't!
*TutorialManipulation Opaleye.Internal.Manipulation> putStrLn $ case update of Update {..} -> arrangeUpdateSql uTable uUpdateWith uWhere
UPDATE "tablename"
SET "id" = "id",
"x" = ("x") + ("y"),
"y" = ("x") - ("y"),
"s" = "s"
WHERE (("id") = (CAST(5 AS integer)))
Thanks for the report. I'll get this fixed at some point, unless you want to submit a PR. Just requires changing SET "id" = DEFAULT,
to SET "id" = "id",
.
Chris Martin commented
Thanks, that's what I hoped 😄 PR submitted.