-
Notifications
You must be signed in to change notification settings - Fork 7
readNamesOfPersonsOlderThan does not compile #1
Copy link
Copy link
Open
Description
The custom comparison operator had a weird error when I tried to run this program. This also failed:
def readNamesOfPersonsOlderThan(age: Int): Future[Seq[String]] = {
val longAgo: LocalDateTime = LocalDateTime.now(DateTimeZone.UTC).minusYears(age)
ctx.run {
quote {
query[Person]
.filter(t => t.birthDate.isAfter(lift(longAgo)) && t.deathDate.isEmpty)
.map(_.name)
}
}
}
Error:(24, 13) Tree 't.birthDate.isAfter((package.this.ctx.liftScalar[org.joda.time.LocalDateTime](longAgo)(scala.Predef.implicitly[io.getquill.example.postgres.async.package.ctx.Encoder[org.joda.time.LocalDateTime]](package.this.ctx.mappedEncoder[org.joda.time.LocalDateTime, java.util.Date](package.this.ctx.jodaLocalDateTimeEncoder, package.this.ctx.dateEncoder))): org.joda.time.LocalDateTime))' can't be parsed to 'Ast' quote {
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels