Comment

Comment by RedCrowbar

EdgeQL lets you do arbitrary joins as well. Here's how you could compute salaries of employees by department even if you for some reason don't have a link between Employee and Department:

    SELECT Department {
        name,
        employees := (
            SELECT Employee { name, salary } 
            FILTER Employee.department_name = Department.name
        )
    }
   
Links in EdgeQL are merely an abstraction over the fact that most joins in a well-normalized schema are done over primary keys.
parent RedCrowbar 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton