test: fix tests following last commit

This commit is contained in:
Gauthier Roebroeck 2021-08-31 14:10:10 +08:00
parent bde858f58e
commit 0384dcd99d
2 changed files with 18 additions and 14 deletions

View file

@ -68,13 +68,15 @@ class BookDao(
// insert urls in a temporary table, else the select size can exceed the statement limit
dsl.deleteFrom(u).execute()
dsl.batch(
dsl.insertInto(u, u.URL).values(null as String?)
).also { step ->
urls.forEach {
step.bind(it.toString())
}
}.execute()
if (urls.isNotEmpty()) {
dsl.batch(
dsl.insertInto(u, u.URL).values(null as String?)
).also { step ->
urls.forEach {
step.bind(it.toString())
}
}.execute()
}
return dsl.selectFrom(b)
.where(b.LIBRARY_ID.eq(libraryId))

View file

@ -46,13 +46,15 @@ class SeriesDao(
// insert urls in a temporary table, else the select size can exceed the statement limit
dsl.deleteFrom(u).execute()
dsl.batch(
dsl.insertInto(u, u.URL).values(null as String?)
).also { step ->
urls.forEach {
step.bind(it.toString())
}
}.execute()
if (urls.isNotEmpty()) {
dsl.batch(
dsl.insertInto(u, u.URL).values(null as String?)
).also { step ->
urls.forEach {
step.bind(it.toString())
}
}.execute()
}
return dsl.selectFrom(s)
.where(s.LIBRARY_ID.eq(libraryId))