diff --git a/site/docs/examples/JOIN/0030-complex-join.js b/site/docs/examples/JOIN/0030-complex-join.js index 347b4dc56..f4b9e4de3 100644 --- a/site/docs/examples/JOIN/0030-complex-join.js +++ b/site/docs/examples/JOIN/0030-complex-join.js @@ -4,7 +4,10 @@ export const complexJoin = `await db.selectFrom('person') (join) => join .onRef('pet.owner_id', '=', 'person.id') .on('pet.name', '=', 'Doggo') - .on((eb) => eb.or([eb("person.age", ">", 18), eb("person.age", "<", 100)])) + .on((eb) => eb.or([ + eb('person.age', '>', 18), + eb('person.age', '<', 100) + ])) ) .selectAll() .execute()` \ No newline at end of file diff --git a/src/query-builder/select-query-builder.ts b/src/query-builder/select-query-builder.ts index edc0ef9d7..279791bbb 100644 --- a/src/query-builder/select-query-builder.ts +++ b/src/query-builder/select-query-builder.ts @@ -597,7 +597,10 @@ export interface SelectQueryBuilder * (join) => join * .onRef('pet.owner_id', '=', 'person.id') * .on('pet.name', '=', 'Doggo') - * .on((eb) => eb.or([eb("person.age", ">", 18), eb("person.age", "<", 100)])) + * .on((eb) => eb.or([ + * eb('person.age', '>', 18), + * eb('person.age', '<', 100) + * ])) * ) * .selectAll() * .execute() @@ -611,6 +614,10 @@ export interface SelectQueryBuilder * inner join "pet" * on "pet"."owner_id" = "person"."id" * and "pet"."name" = $1 + * and ( + * "person"."age" > $2 OR + * "person"."age" < $3 + * ) * ``` * * @@ -2108,7 +2115,7 @@ class SelectQueryBuilderImpl ), }) } - + top( expression: number | bigint, modifiers?: TopModifier,