$write method Null safety

  1. @protected
GenerationContext $write(
  1. Component component,
  2. {bool? hasMultipleTables,
  3. int? startIndex}
)

Will be used by generated code to resolve inline Dart components in sql.

Implementation

@protected
GenerationContext $write(Component component,
    {bool? hasMultipleTables, int? startIndex}) {
  final context = GenerationContext.fromDb(this)
    ..explicitVariableIndex = startIndex;
  if (hasMultipleTables != null) {
    context.hasMultipleTables = hasMultipleTables;
  }
  component.writeInto(context);

  return context;
}