toJson method

Map<String, dynamic> toJson()

Convert to JSON for query builder.

Implementation

Map<String, dynamic> toJson() => {
      '_type': 'computedField',
      'field': field,
      'operation': operation.name,
      'from': from,
      if (where != null) 'where': _serializeWhere(where!),
      if (orderBy != null) 'orderBy': orderBy,
    };