slick-pg
slick-pg copied to clipboard
Adding sql comments into slick generated sql
Is there a way I can add comments into the sql that is formed by slick without writing a raw sql statement? This is to keep track of the code in application that launched the sql.
Here's some codes about table/columns' definition:
...
class A(tag: Tag) extends Table[(Int, String, String)](tag, "A") {
def id = column[Int]("ID", O.PrimaryKey, O.AutoInc)
def s1 = column[String]("S1")
def s2 = column[String]("S2")
def * = (id, s1, s2)
}
...
def column[C](n: String, options: ColumnOption[C]*)(implicit tt: TypedType[C]): Rep[C] = {
...
trait ColumnOptions {
val PrimaryKey = ColumnOption.PrimaryKey
def Default[T](defaultValue: T) = RelationalProfile.ColumnOption.Default[T](defaultValue)
val AutoInc = ColumnOption.AutoInc
val Unique = ColumnOption.Unique
val Length = RelationalProfile.ColumnOption.Length
}
val columnOptions: ColumnOptions = new ColumnOptions {}
I didn't find it.
FYI: Here's a related issue: https://github.com/slick/slick/issues/468