compile method

  1. @override
void compile(
  1. StringBuffer buf,
  2. int indent
)
inherited

Implementation

@override
void compile(StringBuffer buf, int indent) {
  var definitions = <String>[];
  var indexes = <String>[];
  _columns.forEach((name, column) {
    definitions.add(
      '${'  ' * indent}${quoteMySqlIdentifier(name)} '
      '${generator.compileColumn(column)}',
    );
    var index = MySqlFamilyGenerator.compileIndex(name, column);
    if (index != null) indexes.add(index);
  });
  buf.write([...definitions, ...indexes].join(',\n'));
}