resultTypeCode method

String resultTypeCode([
  1. GenerationOptions options = const GenerationOptions()
])

The Dart type representing a row of this result set.

Implementation

String resultTypeCode(
    [GenerationOptions options = const GenerationOptions()]) {
  final resultSet = this.resultSet;
  if (resultSet == null) {
    throw StateError('This query ($name) does not have a result set');
  }

  if (resultSet.matchingTable != null) {
    return resultSet.matchingTable!.table.dartTypeCode(options);
  }

  if (resultSet.singleColumn) {
    return resultSet.columns.single.dartTypeCode(options);
  }

  return resultClassName;
}