mirror of
https://github.com/immich-app/immich.git
synced 2026-02-14 12:58:17 +03:00
string tuple
This commit is contained in:
@@ -87,13 +87,14 @@ export class TimeBucketAssetResponseDto implements TimeBucketAssets {
|
||||
@ApiProperty({
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'array',
|
||||
type: 'string',
|
||||
nullable: true,
|
||||
items: { oneOf: [{ type: 'string' }, { type: 'number' }], minItems: 2, maxItems: 2 },
|
||||
},
|
||||
description: 'The stack ID and stack asset count as a tuple',
|
||||
maxItems: 2,
|
||||
minItems: 2,
|
||||
description: '(stack ID, stack asset count) tuple',
|
||||
})
|
||||
stack?: ([string, number] | null)[];
|
||||
stack?: ([string, string] | null)[];
|
||||
|
||||
@ApiProperty({ type: 'array', items: { type: 'string', nullable: true } })
|
||||
projectionType!: (string | null)[];
|
||||
|
||||
@@ -293,7 +293,7 @@ with
|
||||
inner join "exif" on "assets"."id" = "exif"."assetId"
|
||||
left join lateral (
|
||||
select
|
||||
json_build_array(stacked."stackId", count('stacked')) as "stack"
|
||||
array[stacked."stackId"::text, count('stacked')::text] as "stack"
|
||||
from
|
||||
"assets" as "stacked"
|
||||
where
|
||||
|
||||
@@ -652,7 +652,7 @@ export class AssetRepository {
|
||||
(eb) =>
|
||||
eb
|
||||
.selectFrom('assets as stacked')
|
||||
.select(sql`json_build_array(stacked."stackId", count('stacked'))`.as('stack'))
|
||||
.select(sql`array[stacked."stackId"::text, count('stacked')::text]`.as('stack'))
|
||||
.whereRef('stacked.stackId', '=', 'assets.stackId')
|
||||
.where('stacked.deletedAt', 'is', null)
|
||||
.where('stacked.isArchived', '=', false)
|
||||
|
||||
@@ -19,7 +19,7 @@ export type TimeBucketAssets = {
|
||||
isImage: number[];
|
||||
thumbhash: (string | null)[];
|
||||
localDateTime: string[];
|
||||
stack?: ([string, number] | null)[];
|
||||
stack?: ([string, string] | null)[];
|
||||
duration: (string | null)[];
|
||||
projectionType: (string | null)[];
|
||||
livePhotoVideoId: (string | null)[];
|
||||
|
||||
Reference in New Issue
Block a user