complete adding of common posts gc

This commit is contained in:
2023-11-06 21:27:43 +06:00
parent 0cc0510876
commit 730e3c50e9
7 changed files with 206 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ class ExposedPostsRepo(
) {
val idColumn = text("id")
val createdColumn = double("datetime").default(0.0)
val latestUpdateColumn = double("latest_update").default(0.0)
private val contentRepo by lazy {
ExposedContentInfoRepo(
@@ -81,7 +82,9 @@ class ExposedPostsRepo(
return id
}
override fun update(id: PostId?, value: NewPost, it: UpdateBuilder<Int>) {}
override fun update(id: PostId?, value: NewPost, it: UpdateBuilder<Int>) {
it[latestUpdateColumn] = DateTime.now().unixMillis
}
private fun updateContent(post: RegisteredPost) {
transaction(database) {