Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: migrate partner repo to kysely #15366

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Conversation

jrasm91
Copy link
Contributor

@jrasm91 jrasm91 commented Jan 15, 2025

No description provided.

@jrasm91 jrasm91 force-pushed the refactor/migrate-partner branch from 11b3bb7 to 1a505ad Compare January 15, 2025 17:33
Comment on lines +41 to +42
.select(withSharedBy)
.select(withSharedWith)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.select(withSharedBy)
.select(withSharedWith)
.select((eb) => jsonObjectFrom(eb.selectFrom('sharedBy').select(columns)).as('sharedBy'))
.select((eb) => jsonObjectFrom(eb.selectFrom('sharedWith').select(columns)).as('sharedWith'))

withSharedBy/withSharedWith effectively repeat the work that the inner joins do, so it's better to select from the already-joined tables.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

server/src/repositories/partner.repository.ts Show resolved Hide resolved
Copy link
Contributor

@alextran1502 alextran1502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works well!

@jrasm91 jrasm91 merged commit 097183b into main Jan 17, 2025
36 checks passed
@jrasm91 jrasm91 deleted the refactor/migrate-partner branch January 17, 2025 23:49
ExceptionsOccur pushed a commit to ExceptionsOccur/immich that referenced this pull request Jan 18, 2025
vladd11 pushed a commit to vladd11/immich that referenced this pull request Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants