K
Kysely•5mo ago
bombillazo

Examples inner join using OR?

Hello, we are having trouble trying to have a inner join using OR, as in ON a.id = b.id OR a.sub_id = b.sub_id
3 Replies
bombillazo
bombillazo•5mo ago
The or function seems to be missing from the JoinBuilder class ...
koskimas
koskimas•5mo ago
The on functions work just like where. Just replace the word where with on You can take any where example from the docs
bombillazo
bombillazo•5mo ago
oooooh, I needed to use the join's on as where, I thought join had some onOr function that would make it easier to write, but using an eb inside the join`s on works 🙂 thanks for the clarification