feat(server): optimize get asset query (#7176)

* faster query

* add index

* remove legacy code

* update mock

* remove unused imports

* add relations

* add stack

* formatting

* remove stack relation

* remove unused import

* increase chunk size

* generate sql

* linting

* fix typing

* formatting
This commit is contained in:
Mert
2024-02-18 13:22:25 -05:00
committed by GitHub
parent 8e1c85fe4f
commit 857ec0451d
11 changed files with 111 additions and 45 deletions

View File

@@ -18,6 +18,7 @@ export const newAssetRepositoryMock = (): jest.Mocked<IAssetRepository> => {
getFirstAssetForAlbumId: jest.fn(),
getLastUpdatedAssetForAlbumId: jest.fn(),
getAll: jest.fn().mockResolvedValue({ items: [], hasNextPage: false }),
getAllByFileCreationDate: jest.fn(),
getAllByDeviceId: jest.fn(),
updateAll: jest.fn(),
getByLibraryId: jest.fn(),