mirror of
https://github.com/immich-app/immich.git
synced 2026-03-07 02:27:23 +03:00
refactor: enum casing (#19946)
This commit is contained in:
@@ -256,7 +256,7 @@ export class SearchRepository {
|
||||
}
|
||||
|
||||
return this.db.transaction().execute(async (trx) => {
|
||||
await sql`set local vchordrq.probes = ${sql.lit(probes[VectorIndex.CLIP])}`.execute(trx);
|
||||
await sql`set local vchordrq.probes = ${sql.lit(probes[VectorIndex.Clip])}`.execute(trx);
|
||||
const items = await searchAssetBuilder(trx, options)
|
||||
.selectAll('asset')
|
||||
.innerJoin('smart_search', 'asset.id', 'smart_search.assetId')
|
||||
@@ -284,7 +284,7 @@ export class SearchRepository {
|
||||
}
|
||||
|
||||
return this.db.transaction().execute(async (trx) => {
|
||||
await sql`set local vchordrq.probes = ${sql.lit(probes[VectorIndex.FACE])}`.execute(trx);
|
||||
await sql`set local vchordrq.probes = ${sql.lit(probes[VectorIndex.Face])}`.execute(trx);
|
||||
return await trx
|
||||
.with('cte', (qb) =>
|
||||
qb
|
||||
@@ -351,8 +351,8 @@ export class SearchRepository {
|
||||
.select(['city', 'assetId'])
|
||||
.innerJoin('asset', 'asset.id', 'asset_exif.assetId')
|
||||
.where('asset.ownerId', '=', anyUuid(userIds))
|
||||
.where('asset.visibility', '=', AssetVisibility.TIMELINE)
|
||||
.where('asset.type', '=', AssetType.IMAGE)
|
||||
.where('asset.visibility', '=', AssetVisibility.Timeline)
|
||||
.where('asset.type', '=', AssetType.Image)
|
||||
.where('asset.deletedAt', 'is', null)
|
||||
.orderBy('city')
|
||||
.limit(1);
|
||||
@@ -367,8 +367,8 @@ export class SearchRepository {
|
||||
.select(['city', 'assetId'])
|
||||
.innerJoin('asset', 'asset.id', 'asset_exif.assetId')
|
||||
.where('asset.ownerId', '=', anyUuid(userIds))
|
||||
.where('asset.visibility', '=', AssetVisibility.TIMELINE)
|
||||
.where('asset.type', '=', AssetType.IMAGE)
|
||||
.where('asset.visibility', '=', AssetVisibility.Timeline)
|
||||
.where('asset.type', '=', AssetType.Image)
|
||||
.where('asset.deletedAt', 'is', null)
|
||||
.whereRef('asset_exif.city', '>', 'cte.city')
|
||||
.orderBy('city')
|
||||
@@ -450,7 +450,7 @@ export class SearchRepository {
|
||||
.distinctOn(field)
|
||||
.innerJoin('asset', 'asset.id', 'asset_exif.assetId')
|
||||
.where('ownerId', '=', anyUuid(userIds))
|
||||
.where('visibility', '=', AssetVisibility.TIMELINE)
|
||||
.where('visibility', '=', AssetVisibility.Timeline)
|
||||
.where('deletedAt', 'is', null)
|
||||
.where(field, 'is not', null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user