Optionalalias: stringAdd a WHERE clause to filter subquery results
The condition to filter by
Add a JOIN clause to the subquery
The table to join
The join condition
Optionaltype: "inner" | "left" | "right" | "full"The join type (default: 'inner')
Optionalalias: stringOptional alias for the joined table
// Simple join
from('projects', 'p')
.select('p.id')
.join(
'project_members',
column('p.id').eq('pm.project_id'),
'inner',
'pm'
)
.where(column('pm.user_id').eq(auth.uid()))
// LEFT JOIN
from('organizations', 'org')
.select('org.id')
.join(
'organization_members',
column('org.id').eq('om.organization_id'),
'left',
'om'
)
Convert to SubqueryDefinition (internal use only)
Specify the columns to select