Skip to content

Commit

Permalink
Merge pull request #867 from daharon/daharon/quotes
Browse files Browse the repository at this point in the history
Quoted table names and columns should handle dots.
  • Loading branch information
jczuchnowski committed Jun 9, 2023
2 parents 252e31c + 3f58ec5 commit 8a19fa0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ trait PostgresRenderModule extends PostgresSqlModule { self =>
case _ => ()
}

private[zio] def quoted(name: String): String = "\"" + name + "\""
private[zio] def quoted(name: String): String =
name.split('.').map("\"" + _ + "\"").mkString(".")

private[zio] def renderExpr[A, B](expr: Expr[_, A, B])(implicit render: Renderer): Unit = expr match {
case Expr.Subselect(subselect) =>
Expand Down

0 comments on commit 8a19fa0

Please sign in to comment.