-
Notifications
You must be signed in to change notification settings - Fork 80
add qiita_db/studies/ endpoint #3154
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
Conversation
qiita_db/handlers/studies.py
Outdated
|
||
sql = f""" | ||
SELECT study_id, array_agg(DISTINCT artifact_id) FROM qiita.study | ||
LEFT JOIN qiita.study_artifact USING (study_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why left not inner? Would this create a possibility where artifact_id
is null in the aggregation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, I think it should be fine but I'll change just to be sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wasade, thank you for your review; once you confirm what you prefer for artifact_type I'll push both changes.
qiita_db/handlers/studies.py
Outdated
|
||
sql = f""" | ||
SELECT study_id, array_agg(DISTINCT artifact_id) FROM qiita.study | ||
LEFT JOIN qiita.study_artifact USING (study_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, I think it should be fine but I'll change just to be sure.
@wasade, tests are passing so it should be ready to merge; thank you. |
No description provided.