referenceIsNullable method

bool? referenceIsNullable(
  1. Reference reference
)

Computes whether the element the reference is pointing to is nullable from the perspective of this join model.

This does not include the computed nullability of what the reference is referring to, just whether the reference points to a table that may not be present because it comes from an outer join.

Implementation

bool? referenceIsNullable(Reference reference) {
  final resolved = reference.resolvedColumn;
  if (resolved is AvailableColumn) {
    return availableColumnIsNullable(resolved);
  }

  final resultSet = reference.resultEntity;
  // ignore: avoid_returning_null
  if (resultSet == null) return null;

  return !nonNullable.contains(resultSet);
}