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

Use JOIN ... USING instead of JOIN ... ON #185

Closed
wants to merge 6 commits into from
Closed

Use JOIN ... USING instead of JOIN ... ON #185

wants to merge 6 commits into from

Conversation

smarr
Copy link
Owner

@smarr smarr commented Mar 16, 2024

This is the start of a PR to move from using JOIN ... ON to the JOIN ... USING, which only requires to name the columns on which to join.

Though, while I do like the idea of getting rid of columns just named id, I don't like that the JOIN clauses don't make it explicit which tables are actually joined. While this makes things somewhat redundant, it also allows one to read an SQL query in isolation and see which tables are linked together.

So, this PR is mostly for archival.
I'll close it without merging. (It's also still incomplete).

- rename id columns to use same name as foreign keys
- use critId instead of criterion in Measurement

Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
@smarr smarr closed this Mar 16, 2024
@smarr smarr deleted the using branch March 16, 2024 15:10
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.

1 participant