join<OR> method

SelectFromBuilder<S, R, (R0, R1, R2, R3, R4, R5, OR)> join<OR>(
  1. Schema<OR> table, {
  2. required Filter on,
})

Add a inner join clause of the builder.

Implementation

SelectFromBuilder<S, R, (R0, R1, R2, R3, R4, R5, OR)> join<OR>(
  Schema<OR> table, {
  required Filter on,
}) {
  final result = config.selecting! as SelectableResult;
  final o = table.$;

  return SelectFromBuilder(
    executor,
    config: config.copyWith({
      #selecting: SelectableResult<(R0, R1, R2, R3, R4, R5, OR)>(
          [...result.selected, o]),
      #joins: [
        ...config.joins,
        InnerJoin<Schema<OR>, OR>(o, on: on),
      ],
    }),
  );
}