toJson method
Implementation
@override
Map<String, dynamic> toJson() {
return {
'declaredConstants': declaredConstants,
'connectionAliases': connectionAliases,
if (entityAliases.isNotEmpty) 'entityAliases': entityAliases,
'rootInvocations': rootInvocations.map((i) => i.toJson()).toList(),
'joins': joins.map((j) => j.toJson()).toList(),
if (orderBys.isNotEmpty) 'orderBys': orderBys.map((o) => o.toJson()).toList(),
if (orderBy != null) 'orderBy': orderBy!.toJson(),
if (limit != null) 'limit': limit,
if (offset != null) 'offset': offset,
if (groupByColumns.isNotEmpty) 'groupByColumns': groupByColumns,
if (havingPredicate != null) 'havingPredicate': havingPredicate!.toJson(),
if (projections.isNotEmpty) 'projections': projections.map((p) => p.toJson()).toList(),
};
}