0
私はポストグルにpg-slick拡張を使用しています。私はwhere節で計算をしようとするが、私はそれを働かせない。スリックタイムスタンプ計算
value - is not a member of java.sql.Timestamp
フィルター句:
.filter(r => Timestamp.from(Instant.now()) - r.lastActivity < Duration.ofMinutes(30))
lastActivityがある:それは常に言う
def lastActivity = column[Timestamp]("last_activity")
と私のPostgresのドライバは、次のとおりです。
trait MyPostgresDriver extends ExPostgresProfile
with PgPostGISSupport
with PgDate2Support
with PgEnumSupport {
override val api: API = new API {}
///
trait API extends super.API
with PostGISImplicits
with DateTimeImplicits
with PostGISAssistants {
}
}
object MyPostgresDriver extends MyPostgresDriver