mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-05 22:55:58 +00:00
Fix query to also work with mariadb
This commit is contained in:
parent
5f32eadaba
commit
cc16b0c024
@ -35,11 +35,11 @@ object QCollective {
|
|||||||
from attachment a
|
from attachment a
|
||||||
inner join item i on a.itemid = i.itemid
|
inner join item i on a.itemid = i.itemid
|
||||||
where i.cid = $coll)
|
where i.cid = $coll)
|
||||||
(select a.fid,m.length from attachs a
|
select a.fid,m.length from attachs a
|
||||||
inner join filemeta m on m.id = a.fid
|
inner join filemeta m on m.id = a.fid
|
||||||
union
|
union distinct
|
||||||
select a.file_id,m.length from attachment_source a
|
select a.file_id,m.length from attachment_source a
|
||||||
inner join filemeta m on m.id = a.file_id where a.id in (select aid from attachs))
|
inner join filemeta m on m.id = a.file_id where a.id in (select aid from attachs)
|
||||||
) as t""".query[Option[Long]].unique
|
) as t""".query[Option[Long]].unique
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user