Cleanup + hiding false errors from log

This commit is contained in:
Eike Kettner
2020-06-24 00:23:22 +02:00
parent 30937d4908
commit 7d7460b1c9
4 changed files with 15 additions and 8 deletions

View File

@ -214,7 +214,11 @@ object QItem {
Batch(0, c)
}
private def findItemsBase(q: Query, distinct: Boolean, ctes: (String, Fragment)*): Fragment = {
private def findItemsBase(
q: Query,
distinct: Boolean,
ctes: (String, Fragment)*
): Fragment = {
val IC = RItem.Columns
val AC = RAttachment.Columns
val PC = RPerson.Columns
@ -389,7 +393,11 @@ object QItem {
.map(it => fr"(${it.itemId}, ${it.weight})")
.reduce((r, e) => r ++ fr"," ++ e)
val from = findItemsBase(q, false, ("tids(item_id, weight)", fr"(VALUES" ++ values ++ fr")")) ++
val from = findItemsBase(
q,
false,
("tids(item_id, weight)", fr"(VALUES" ++ values ++ fr")")
) ++
fr"INNER JOIN tids ON" ++ IC.id.prefix("i").f ++ fr" = tids.item_id" ++
fr"ORDER BY tids.weight DESC"

View File

@ -46,7 +46,7 @@ object RFtsMigration {
table,
all,
fr"${v.id},${v.version},${v.ftsEngine},${v.description},${v.created}"
).update.run
).updateWithLogHandler(LogHandler.nop).run
def exists(vers: Int, engine: Ident): ConnectionIO[Boolean] =
selectCount(id, table, and(version.is(vers), ftsEngine.is(engine)))