mirror of
https://github.com/immich-app/immich.git
synced 2025-01-28 00:59:18 -05:00
Merge branch 'feat/nullable-dates' of https://github.com/immich-app/immich into feat/inline-offline-check
This commit is contained in:
commit
3eb7f297a5
2 changed files with 14 additions and 2 deletions
|
@ -400,7 +400,7 @@ export function searchAssetBuilder(kysely: Kysely<DB>, options: AssetSearchBuild
|
|||
.$if(!!options.withExif, withExifInner)
|
||||
.$if(!!(options.withFaces || options.withPeople || options.personIds), (qb) => qb.select(withFacesAndPeople))
|
||||
.$if(!options.withDeleted, (qb) => qb.where('assets.deletedAt', 'is', null))
|
||||
.$if(!options.withNullLocalDateTime, (qb) => qb.where('assets.localDateTime', 'is not', null))
|
||||
.$if(!options.withNullFileModifiedAt, (qb) => qb.where('assets.fileModifiedAt', 'is not', null))
|
||||
.$if(!options.withNullFileCreatedAt, (qb) => qb.where('assets.fileCreatedAt', 'is not', null))
|
||||
.$if(!options.withNullFileModifiedAt, (qb) => qb.where('assets.fileModifiedAt', 'is not', null));
|
||||
.$if(!options.withNullLocalDateTime, (qb) => qb.where('assets.localDateTime', 'is not', null));
|
||||
}
|
||||
|
|
|
@ -13,6 +13,9 @@ where
|
|||
and "assets"."isFavorite" = $4
|
||||
and "assets"."isArchived" = $5
|
||||
and "assets"."deletedAt" is null
|
||||
and "assets"."fileModifiedAt" is not null
|
||||
and "assets"."fileCreatedAt" is not null
|
||||
and "assets"."localDateTime" is not null
|
||||
order by
|
||||
"assets"."fileCreatedAt" desc
|
||||
limit
|
||||
|
@ -34,6 +37,9 @@ offset
|
|||
and "assets"."isFavorite" = $4
|
||||
and "assets"."isArchived" = $5
|
||||
and "assets"."deletedAt" is null
|
||||
and "assets"."fileModifiedAt" is not null
|
||||
and "assets"."fileCreatedAt" is not null
|
||||
and "assets"."localDateTime" is not null
|
||||
and "assets"."id" < $6
|
||||
order by
|
||||
random()
|
||||
|
@ -54,6 +60,9 @@ union all
|
|||
and "assets"."isFavorite" = $11
|
||||
and "assets"."isArchived" = $12
|
||||
and "assets"."deletedAt" is null
|
||||
and "assets"."fileModifiedAt" is not null
|
||||
and "assets"."fileCreatedAt" is not null
|
||||
and "assets"."localDateTime" is not null
|
||||
and "assets"."id" > $13
|
||||
order by
|
||||
random()
|
||||
|
@ -77,6 +86,9 @@ where
|
|||
and "assets"."isFavorite" = $4
|
||||
and "assets"."isArchived" = $5
|
||||
and "assets"."deletedAt" is null
|
||||
and "assets"."fileModifiedAt" is not null
|
||||
and "assets"."fileCreatedAt" is not null
|
||||
and "assets"."localDateTime" is not null
|
||||
order by
|
||||
smart_search.embedding <=> $6
|
||||
limit
|
||||
|
|
Loading…
Add table
Reference in a new issue