Skip to content

Commit

Permalink
Remove "comment" from Query case class
Browse files Browse the repository at this point in the history
  • Loading branch information
andylam-db committed Jan 22, 2024
1 parent 3042ed8 commit c3013c7
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ trait QueryGeneratorHelper {

/**
* Case class that encapsulates a Query, built with its different clauses.
* @param comment A string that will be printed as a comment a line before the query string.
*/
case class Query(
selectClause: SelectClause,
Expand All @@ -215,10 +214,9 @@ trait QueryGeneratorHelper {
def getOptionClauseString(optionalClause: Option[Clause]): String =
if (optionalClause.isDefined) { " " + optionalClause.get.toString } else { "" }

val queryString = f"$selectClause $fromClause${getOptionClauseString(whereClause)}" +
f"$selectClause $fromClause${getOptionClauseString(whereClause)}" +
f"${getOptionClauseString(groupByClause)}${getOptionClauseString(orderByClause)}" +
f"${getOptionClauseString(limitClause)}"
queryString
}
}
}

0 comments on commit c3013c7

Please sign in to comment.