innerColumnType method

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

Implementation

String innerColumnType(
    [GenerationOptions options = const GenerationOptions()]) {
  String code;

  switch (type) {
    case ColumnType.integer:
      code = 'int';
      break;
    case ColumnType.bigInt:
      code = 'BigInt';
      break;
    case ColumnType.text:
      code = 'String';
      break;
    case ColumnType.boolean:
      code = 'bool';
      break;
    case ColumnType.datetime:
      code = 'DateTime';
      break;
    case ColumnType.blob:
      code = 'Uint8List';
      break;
    case ColumnType.real:
      code = 'double';
      break;
  }

  // We currently use nullable columns everywhere because it's not clear how
  // to express nullability in joins otherwise.
  return options.nnbd ? '$code?' : code;
}