mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: stream for sidecar (#17995)
* refactor: stream for sidecar * chore: make sql --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
parent
436cff72b5
commit
732b06eec8
6 changed files with 46 additions and 38 deletions
|
|
@ -470,6 +470,18 @@ from
|
|||
where
|
||||
"assets"."deletedAt" <= $1
|
||||
|
||||
-- AssetJobRepository.streamForSidecar
|
||||
select
|
||||
"assets"."id"
|
||||
from
|
||||
"assets"
|
||||
where
|
||||
(
|
||||
"assets"."sidecarPath" = $1
|
||||
or "assets"."sidecarPath" is null
|
||||
)
|
||||
and "assets"."isVisible" = $2
|
||||
|
||||
-- AssetJobRepository.streamForDetectFacesJob
|
||||
select
|
||||
"assets"."id"
|
||||
|
|
|
|||
|
|
@ -238,18 +238,13 @@ select
|
|||
from
|
||||
"assets"
|
||||
where
|
||||
(
|
||||
"assets"."sidecarPath" = $1
|
||||
or "assets"."sidecarPath" is null
|
||||
)
|
||||
and "assets"."isVisible" = $2
|
||||
and "deletedAt" is null
|
||||
"deletedAt" is null
|
||||
order by
|
||||
"createdAt"
|
||||
limit
|
||||
$3
|
||||
$1
|
||||
offset
|
||||
$4
|
||||
$2
|
||||
|
||||
-- AssetRepository.getTimeBuckets
|
||||
with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue