fix: sql generation issues (#8361)

chore: fix sql gen issues
This commit is contained in:
Jason Rasmussen
2024-03-30 00:16:06 -04:00
committed by GitHub
parent 25c9b779e4
commit 4b39d37cae
19 changed files with 494 additions and 275 deletions
+2 -2
View File
@@ -75,7 +75,7 @@ export class AssetRepository implements IAssetRepository {
return this.repository.save(asset);
}
@GenerateSql({ params: [DummyValue.UUID, { day: 1, month: 1 }] })
@GenerateSql({ params: [[DummyValue.UUID], { day: 1, month: 1 }] })
getByDayOfYear(ownerIds: string[], { day, month }: MonthDay): Promise<AssetEntity[]> {
return this.repository
.createQueryBuilder('entity')
@@ -159,7 +159,7 @@ export class AssetRepository implements IAssetRepository {
return this.getAll(pagination, { ...options, userIds: [userId] });
}
@GenerateSql({ params: [[DummyValue.UUID]] })
@GenerateSql({ params: [{ take: 1, skip: 0 }, DummyValue.UUID] })
getLibraryAssetPaths(pagination: PaginationOptions, libraryId: string): Paginated<AssetPathEntity> {
return paginate(this.repository, pagination, {
select: { id: true, originalPath: true, isOffline: true },