toJson method
Serialize to JSON
Implementation
Map<String, dynamic> toJson() => {
if (action != null) 'action': QueryAction.values.indexOf(action!),
if (forProviders.isNotEmpty) 'forProviders': forProviders.map((p) => p.toJson()).toList(),
if (limit != null) 'limit': limit,
if (limitBy.isNotEmpty) 'limitBy': limitBy.map((l) => l.toJson()).toList(),
if (offset != null) 'offset': offset,
if (providerArgs.isNotEmpty) 'providerArgs': providerArgs,
if (orderBy.isNotEmpty) 'orderBy': orderBy.map((s) => s.toJson()).toList(),
if (where != null) 'where': where!.map((w) => w.toJson()).toList(),
};