mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-06 15:15:58 +00:00
Fix offset/limit clause for mariadb
MariaDB wants first limit and then offset (optionally), postgres doesn't care.
This commit is contained in:
parent
b150269528
commit
d5819eab35
@ -330,7 +330,7 @@ object QItem {
|
|||||||
val frag =
|
val frag =
|
||||||
query ++ fr"WHERE" ++ cond ++ order ++ (if (batch == Batch.all) Fragment.empty
|
query ++ fr"WHERE" ++ cond ++ order ++ (if (batch == Batch.all) Fragment.empty
|
||||||
else
|
else
|
||||||
fr"OFFSET ${batch.offset} LIMIT ${batch.limit}")
|
fr"LIMIT ${batch.limit} OFFSET ${batch.offset}")
|
||||||
logger.trace(s"List items: $frag")
|
logger.trace(s"List items: $frag")
|
||||||
frag.query[ListItem].stream
|
frag.query[ListItem].stream
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user