StructuredQuery.fromJson constructor

StructuredQuery.fromJson(
  1. Map _json
)

Implementation

StructuredQuery.fromJson(core.Map _json)
    : this(
        endAt: _json.containsKey('endAt')
            ? Cursor.fromJson(
                _json['endAt'] as core.Map<core.String, core.dynamic>)
            : null,
        from: _json.containsKey('from')
            ? (_json['from'] as core.List)
                .map((value) => CollectionSelector.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        limit: _json.containsKey('limit') ? _json['limit'] as core.int : null,
        offset:
            _json.containsKey('offset') ? _json['offset'] as core.int : null,
        orderBy: _json.containsKey('orderBy')
            ? (_json['orderBy'] as core.List)
                .map((value) => Order.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        select: _json.containsKey('select')
            ? Projection.fromJson(
                _json['select'] as core.Map<core.String, core.dynamic>)
            : null,
        startAt: _json.containsKey('startAt')
            ? Cursor.fromJson(
                _json['startAt'] as core.Map<core.String, core.dynamic>)
            : null,
        where: _json.containsKey('where')
            ? Filter.fromJson(
                _json['where'] as core.Map<core.String, core.dynamic>)
            : null,
      );