ExecuteStatementResponse.fromJson constructor

ExecuteStatementResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ExecuteStatementResponse.fromJson(Map<String, dynamic> json) {
  return ExecuteStatementResponse(
    columnMetadata: (json['columnMetadata'] as List?)
        ?.whereNotNull()
        .map((e) => ColumnMetadata.fromJson(e as Map<String, dynamic>))
        .toList(),
    generatedFields: (json['generatedFields'] as List?)
        ?.whereNotNull()
        .map((e) => Field.fromJson(e as Map<String, dynamic>))
        .toList(),
    numberOfRecordsUpdated: json['numberOfRecordsUpdated'] as int?,
    records: (json['records'] as List?)
        ?.whereNotNull()
        .map((e) => (e as List)
            .whereNotNull()
            .map((e) => Field.fromJson(e as Map<String, dynamic>))
            .toList())
        .toList(),
  );
}