mssqlRequireNonNull function

Object mssqlRequireNonNull(
  1. Object? value, {
  2. required String source,
  3. required String column,
})

Unwraps value or throws MssqlUnexpectedNullException.

Generated query mappers use this instead of ! so the failure names the file and column.

Implementation

Object mssqlRequireNonNull(
  Object? value, {
  required String source,
  required String column,
}) {
  if (value == null) {
    throw MssqlUnexpectedNullException(source: source, column: column);
  }
  return value;
}