Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit fb0dc7d

Browse files
committed
Fix vari/case printers
1 parent 3a4bb87 commit fb0dc7d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/SqlSquare/Signature.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,16 +474,16 @@ printSqlF printLiteralF = case _ of
474474
<> expr
475475
<> F.intercalate " " (map CS.printCase cases)
476476
<> F.foldMap (" ELSE " <> _) else_
477-
<> "END"
477+
<> " END"
478478
Switch { cases, else_ } →
479479
"CASE "
480480
<> F.intercalate " " (map CS.printCase cases)
481481
<> F.foldMap (" ELSE " <> _) else_
482-
<> "END"
482+
<> " END"
483483
Let { ident, bindTo, in_ } →
484484
ID.printIdent ident <> " := " <> bindTo <> "; " <> in_
485485
Vari s →
486-
":" <> s
486+
":" <> ID.printIdent s
487487
Select { isDistinct, projections, relations, filter, groupBy, orderBy } →
488488
"SELECT "
489489
<> (if isDistinct then "DISTINCT " else "")

src/SqlSquare/Signature/Case.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ instance traversableCase ∷ T.Traversable Case where
2828
sequence = T.sequenceDefault
2929

3030
printCase Algebra Case String
31-
printCase (Case { cond, expr }) = " WHEN " <> cond <> " THEN " <> expr
31+
printCase (Case { cond, expr }) = "WHEN " <> cond <> " THEN " <> expr
3232

3333
encodeJsonCase Algebra Case J.Json
3434
encodeJsonCase (Case { cond, expr }) =

0 commit comments

Comments
 (0)