compile method

SchemaPreview compile(
  1. SchemaPlan plan
)

Implementation

SchemaPreview compile(SchemaPlan plan) {
  final statements = <SchemaStatement>[];
  for (final mutation in plan.mutations) {
    final hookStatements = _hookStatements(mutation);
    if (hookStatements != null) {
      statements.addAll(hookStatements);
      continue;
    }
    statements.addAll(dialect.compileMutation(mutation));
  }
  return SchemaPreview(List.unmodifiable(statements));
}