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

registry: add GET api/v1/trunk-project/{name}, api/v1/trunk-project/{name}/version/{version} #519

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

vrmiguel
Copy link
Member

No description provided.

@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-519.dwcnpr7p8u1tw.amplifyapp.com

Comment on lines +164 to +168
pub async fn trunk_projects_by_name(
&self,
trunk_project_name: &str,
) -> Result<Vec<TrunkProjectView>> {
let records = sqlx::query!(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this would be a lot easier as a view then use JSONB WHERE, and this way I think is duplicating the json schema into multiple locations, which could be slightly tricker! but I still think this is fine

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, I'm pondering on ways to remove this repetition as well :s

As a view with JSONB WHERE would we be fetching all information first and then filtering it later on?

@vrmiguel vrmiguel merged commit e3dc657 into main Oct 30, 2023
5 checks passed
@vrmiguel vrmiguel deleted the v1/trunk-project-specific branch October 30, 2023 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants