join method

MssqlQuery join(
  1. MssqlJoinKind kind,
  2. String identifier, {
  3. String? as,
  4. MssqlCondition? on,
})

Implementation

MssqlQuery join(
  MssqlJoinKind kind,
  String identifier, {
  String? as,
  MssqlCondition? on,
}) {
  if (kind == MssqlJoinKind.cross) {
    if (on != null) {
      throw ArgumentError.value(on, 'on', 'A CROSS JOIN takes no ON clause.');
    }
  } else if (on == null) {
    throw ArgumentError.notNull('on');
  }
  return _with(
    joins: <MssqlJoin>[
      ...joins,
      MssqlJoin(kind, MssqlSource(identifier, alias: as), on),
    ],
  );
}