All Downloads are FREE. Search and download functionalities are using the official Maven repository.

harness.sql.AppliedCol.scala Maven / Gradle / Ivy

There is a newer version: 5.1.3
Show newest version
package harness.sql

import harness.deriving.K11.~>

final case class AppliedCol[T](tableVarName: String, col: Col[T]) {
  def ref: ColRef = ColRef(tableVarName, col.colName)
  def show: String = s"$tableVarName.${col.colName}"
}
object AppliedCol {

  final case class Opt[T](wrapped: AppliedCol[T])

  def withVarName(tableVarName: String): Col ~> AppliedCol =
    [a] => (fa: Col[a]) => AppliedCol(tableVarName, fa)

  def optional: AppliedCol ~> AppliedCol.Opt =
    [a] => (fa: AppliedCol[a]) => Opt(fa)

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy