News for hackers. Stuff that matters.
Re:SQL language proposal: JOIN FOREIGN by JoelJacobson on Thursday December 30, 2021 @04:35PM (#29741729)
It would indeed be difficult to remember, but the proposal also suggest changing the default naming convention for foreign keys, to give them the same name as the referenced table.

If using an ORM, I would guess this proposal isn't useful, since then you wouldn't hand-write queries anyway, right? Except when you want to override the queries generated by the ORM? (I'm not an ORM user myself.)

Re:SQL language proposal: JOIN FOREIGN by to11mtm on Thursday December 30, 2021 @05:42PM (#29742414)
Speaking as someone who has used ORMs in the past and contributes to a LINQ Micro ORM...

It might make tooling 'easier', but since backwards compatibility has to be considered the actual value add is questionable IMO.

Most ORMs/MicroORMs will have tooling that sniffs out the DB Schema including foreign keys, and if you are using those bits (i.e. 'not hand written') most will do the right thing today. I suppose you could include some extra syntax for whatever DSL you're providing users....

IDK. Speaking as someone who is very comfortable in SQL, This feels more like syntactic sugar than anything else.

Re:SQL language proposal: JOIN FOREIGN by lolive on Friday December 31, 2021 @04:22AM (#29746297)
Could you please elaborate on this FK sniffing, and which tools are actually implementing that?
Re:SQL language proposal: JOIN FOREIGN by to11mtm on Thursday January 06, 2022 @10:45PM (#29834575)
Ahhh, I know that Entity Framework would do this at one point, IDK if EF Core does or not.

Linq2Db does it via T4 Template generation, so you can play with it more if you want [0]

[0] - https://github.com/linq2db/linq2db/blob/64a0db9a9ed7787ff755...