If we use the implicit class with type parameter, resolution of AST will not be as expected.
Actual behavior
Executed SQL='UPDATE `TestTable` SET unused = 'unused''
Steps to reproduce the behavior
CREATE TABLE IF NOT EXISTS `TestTable` (
`time` DATETIME(6)
);
case class TestTable(time: LocalDateTime)
// I have created this process expecting to operate generically so that the column name may be different depending on the table
implicit class UpdateCurrentTime[T](entityQuery: EntityQuery[T]) {
def updateCurrentTime[C](identifyColumn: T => C) = quote {
entityQuery.update { r =>
val column = identifyColumn(r)
column -> infix"CURRENT_TIMESTAMP(6)".as[C]
}
}
}
Version: (e.g.
2.5.4
) Module: (e.g.quill-finagle-mysql
) Database: (e.g.MariaDB
)Expected behavior
If we use the implicit class with type parameter, resolution of AST will not be as expected.
Actual behavior
Steps to reproduce the behavior
Workaround
Although versatility will be lowered, define the specific type in advance as follows:
@getquill/maintainers