Skip to content

Conversation

@justhaug
Copy link

No description provided.



- Unreleased: Check https://github.com/sqlparser-rs/sqlparser-rs/commits/main for undocumented changes.
- Unreleased:
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 we can revert this diff, the changelog is handled separately upon release.

fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn prefix(constraint: &JoinConstraint) -> &'static str {
match constraint {
JoinConstraint::Auto => "AUTO ",
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @justhaug could you add some context around this syntax and a link to the documentation that supports it?

@justhaug justhaug closed this Sep 18, 2025
@justhaug
Copy link
Author

justhaug commented Sep 18, 2025

Sorry about that, I accidentally let codex-cli off its leash and it made this PR.

This is for our own database, not standard SQL syntax I was planning on maintaining a branch for this for our own use.

Like natural join, but it matches on primary key - foreign key automatically regardless of name e.g.:

SELECT * FROM customers AUTO JOIN orders

is same as:

SELECT * FROM customers JOIN orders ON customers.id = orders.customer_id

If other databases implement this I'd be happy to make a proper PR then :)

@justhaug justhaug deleted the auto-join branch September 18, 2025 17:02
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