Query.fromJson constructor

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

Deserialize from JSON

Implementation

factory Query.fromJson(Map<String, dynamic> json) => Query(
      action: json['action'] == null ? null : QueryAction.values[json['action']],
      limit: json['limit'] as int?,
      limitBy: json['limitBy']?.map(LimitBy.fromJson).toList() ?? [],
      offset: json['offset'] as int?,
      orderBy: json['orderBy']?.map(OrderBy.fromJson).toList() ?? [],
      providerArgs: Map<String, dynamic>.from(json['providerArgs'] as Map? ?? {}),
      where: json['where']?.map(WhereCondition.fromJson),
    );