mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2024-12-22 05:57:13 +00:00
fix build
This commit is contained in:
parent
b879426f9d
commit
9af72d5d0f
@ -1,14 +1,14 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
kotlin = "2.0.10"
|
kotlin = "2.0.20"
|
||||||
kotlin-serialization = "1.7.1"
|
kotlin-serialization = "1.7.2"
|
||||||
|
|
||||||
plagubot = "9.0.0"
|
plagubot = "9.2.0"
|
||||||
tgbotapi = "16.0.0"
|
tgbotapi = "18.1.0"
|
||||||
microutils = "0.22.0"
|
microutils = "0.22.2"
|
||||||
kslog = "1.3.5"
|
kslog = "1.3.6"
|
||||||
krontab = "2.4.0"
|
krontab = "2.4.0"
|
||||||
plagubot-plugins = "0.20.0"
|
plagubot-plugins = "0.21.0"
|
||||||
|
|
||||||
dokka = "1.9.20"
|
dokka = "1.9.20"
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class ExposedPostsRepo(
|
|||||||
id,
|
id,
|
||||||
DateTime(get(createdColumn)),
|
DateTime(get(createdColumn)),
|
||||||
with(contentRepo) {
|
with(contentRepo) {
|
||||||
select { postIdColumn.eq(id.string) }.map {
|
selectAll().where { postIdColumn.eq(id.string) }.map {
|
||||||
it.asObject
|
it.asObject
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -69,14 +69,14 @@ class ExposedPostsRepo(
|
|||||||
id,
|
id,
|
||||||
DateTime(get(createdColumn)),
|
DateTime(get(createdColumn)),
|
||||||
with(contentRepo) {
|
with(contentRepo) {
|
||||||
select { postIdColumn.eq(id.string) }.map {
|
selectAll().where { postIdColumn.eq(id.string) }.map {
|
||||||
it.asObject
|
it.asObject
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun createAndInsertId(value: NewPost, it: InsertStatement<Number>): PostId {
|
override fun createAndInsertId(value: NewPost, it: UpdateBuilder<Int>): PostId {
|
||||||
val id = PostId(uuid4().toString())
|
val id = PostId(uuid4().toString())
|
||||||
it[idColumn] = id.string
|
it[idColumn] = id.string
|
||||||
return id
|
return id
|
||||||
@ -104,7 +104,7 @@ class ExposedPostsRepo(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun insert(value: NewPost, it: InsertStatement<Number>) {
|
override fun insert(value: NewPost, it: UpdateBuilder<Int>) {
|
||||||
super.insert(value, it)
|
super.insert(value, it)
|
||||||
it[createdColumn] = DateTime.now().unixMillis
|
it[createdColumn] = DateTime.now().unixMillis
|
||||||
}
|
}
|
||||||
@ -144,7 +144,7 @@ class ExposedPostsRepo(
|
|||||||
existsIds
|
existsIds
|
||||||
} else {
|
} else {
|
||||||
existsIds.filter {
|
existsIds.filter {
|
||||||
select { selectById(it) }.limit(1).none()
|
selectAll().where { selectById(it) }.limit(1).none()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.forEach {
|
}.forEach {
|
||||||
@ -156,7 +156,7 @@ class ExposedPostsRepo(
|
|||||||
override suspend fun getIdByChatAndMessage(chatId: IdChatIdentifier, messageId: MessageId): PostId? {
|
override suspend fun getIdByChatAndMessage(chatId: IdChatIdentifier, messageId: MessageId): PostId? {
|
||||||
return transaction(database) {
|
return transaction(database) {
|
||||||
with(contentRepo) {
|
with(contentRepo) {
|
||||||
select {
|
selectAll().where {
|
||||||
chatIdColumn.eq(chatId.chatId.long)
|
chatIdColumn.eq(chatId.chatId.long)
|
||||||
.and(chatId.threadId ?.let { threadIdColumn.eq(it.long) } ?: threadIdColumn.isNull())
|
.and(chatId.threadId ?.let { threadIdColumn.eq(it.long) } ?: threadIdColumn.isNull())
|
||||||
.and(messageIdColumn.eq(messageId.long))
|
.and(messageIdColumn.eq(messageId.long))
|
||||||
@ -166,12 +166,12 @@ class ExposedPostsRepo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun getPostCreationTime(postId: PostId): DateTime? = transaction(database) {
|
override suspend fun getPostCreationTime(postId: PostId): DateTime? = transaction(database) {
|
||||||
select { selectById(postId) }.limit(1).firstOrNull() ?.get(createdColumn) ?.let(::DateTime)
|
selectAll().where { selectById(postId) }.limit(1).firstOrNull() ?.get(createdColumn) ?.let(::DateTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun getFirstMessageInfo(postId: PostId): PostContentInfo? = transaction(database) {
|
override suspend fun getFirstMessageInfo(postId: PostId): PostContentInfo? = transaction(database) {
|
||||||
with(contentRepo) {
|
with(contentRepo) {
|
||||||
select { postIdColumn.eq(postId.string) }.limit(1).firstOrNull() ?.asObject
|
selectAll().where { postIdColumn.eq(postId.string) }.limit(1).firstOrNull() ?.asObject
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ class ExposedPollsToMessagesInfoRepo(
|
|||||||
it[messageIdColumn] = v.messageId.long
|
it[messageIdColumn] = v.messageId.long
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun insertKey(k: PollId, v: ShortMessageInfo, it: InsertStatement<Number>) {
|
override fun insertKey(k: PollId, v: ShortMessageInfo, it: UpdateBuilder<Int>) {
|
||||||
it[keyColumn] = k.string
|
it[keyColumn] = k.string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class ExposedPollsToPostsIdsRepo(
|
|||||||
it[postIdColumn] = v.string
|
it[postIdColumn] = v.string
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun insertKey(k: PollId, v: PostId, it: InsertStatement<Number>) {
|
override fun insertKey(k: PollId, v: PostId, it: UpdateBuilder<Int>) {
|
||||||
it[keyColumn] = k.string
|
it[keyColumn] = k.string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ class ExposedRatingsRepo (
|
|||||||
it[ratingsColumn] = v.double
|
it[ratingsColumn] = v.double
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun insertKey(k: PostId, v: Rating, it: InsertStatement<Number>) {
|
override fun insertKey(k: PostId, v: Rating, it: UpdateBuilder<Int>) {
|
||||||
it[keyColumn] = k.string
|
it[keyColumn] = k.string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class ExposedTimersRepo(
|
|||||||
it[dateTimeColumn] = v.unixMillisLong
|
it[dateTimeColumn] = v.unixMillisLong
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun insertKey(k: PostId, v: DateTime, it: InsertStatement<Number>) {
|
override fun insertKey(k: PostId, v: DateTime, it: UpdateBuilder<Int>) {
|
||||||
it[keyColumn] = k.string
|
it[keyColumn] = k.string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user