Skip to content

Commit 4acf802

Browse files
authored
#24 Fix DBTable NamedParams to SQL where condition generation (#25)
1 parent ae4433c commit 4acf802

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

balta/src/main/scala/za/co/absa/balta/classes/DBTable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ case class DBTable(tableName: String) extends DBQuerySupport{
197197
}
198198

199199
private def paramsToWhereCondition(params: NamedParams): String = {
200-
params.pairs.foldLeft(List.empty[String]) {case (acc, (fieldName, setterFnc)) =>
200+
params.pairs.foldRight(List.empty[String]) {case ((fieldName, setterFnc), acc) =>
201201
s"$fieldName = ${setterFnc.sqlEntry}" :: acc // TODO https://github.com/AbsaOSS/balta/issues/2
202202
}.mkString(" AND ")
203203
}

0 commit comments

Comments
 (0)