@@ -27,7 +27,7 @@ SOQL.of(Opportunity.SObjectType)
2727 .with(Opportunity.CampaignId)
2828 .avg(Opportunity.Amount, 'amount')
2929 .groupBy(Opportunity.CampaignId)
30- .toAggregate ();
30+ .toAggregated ();
3131```
3232
3333## AVG Related Field
@@ -44,7 +44,7 @@ FROM OpportunityLineItem
4444``` apex title="SOQL Lib Approach"
4545SOQL.of(OpportunityLineItem.SObjectType)
4646 .avg('Opportunity', Opportunity.Amount)
47- .toAggregate ();
47+ .toAggregated ();
4848```
4949
5050## AVG Related Field with Alias
@@ -61,7 +61,7 @@ FROM OpportunityLineItem
6161``` apex
6262SOQL.of(OpportunityLineItem.SObjectType)
6363 .avg('Opportunity', Opportunity.Amount, 'amount')
64- .toAggregate ();
64+ .toAggregated ();
6565```
6666
6767## SUM
@@ -81,7 +81,7 @@ SOQL.of(Opportunity.SObjectType)
8181 .with(Opportunity.CampaignId)
8282 .sum(Opportunity.Amount, 'totalAmount')
8383 .groupBy(Opportunity.CampaignId)
84- .toAggregate ();
84+ .toAggregated ();
8585```
8686
8787## SUM Related Field
@@ -98,7 +98,7 @@ FROM OpportunityLineItem
9898``` apex
9999SOQL.of(OpportunityLineItem.SObjectType)
100100 .sum('Opportunity', Opportunity.Amount)
101- .toAggregate ();
101+ .toAggregated ();
102102```
103103
104104## SUM Related Field with Alias
@@ -115,7 +115,7 @@ FROM OpportunityLineItem
115115``` apex
116116SOQL.of(OpportunityLineItem.SObjectType)
117117 .sum('Opportunity', Opportunity.Amount, 'totalAmount')
118- .toAggregate ();
118+ .toAggregated ();
119119```
120120
121121## MIN
@@ -135,7 +135,7 @@ SOQL.of(Opportunity.SObjectType)
135135 .with(Opportunity.CampaignId)
136136 .min(Opportunity.Amount, 'minAmount')
137137 .groupBy(Opportunity.CampaignId)
138- .toAggregate ();
138+ .toAggregated ();
139139```
140140
141141## MIN Related Field
@@ -152,7 +152,7 @@ FROM OpportunityLineItem
152152``` apex
153153SOQL.of(OpportunityLineItem.SObjectType)
154154 .min('Opportunity', Opportunity.Amount)
155- .toAggregate ();
155+ .toAggregated ();
156156```
157157
158158## MIN Related Field with Alias
@@ -169,7 +169,7 @@ FROM OpportunityLineItem
169169``` apex
170170SOQL.of(OpportunityLineItem.SObjectType)
171171 .min('Opportunity', Opportunity.Amount, 'minAmount')
172- .toAggregate ();
172+ .toAggregated ();
173173```
174174
175175## MAX
@@ -189,7 +189,7 @@ SOQL.of(Opportunity.SObjectType)
189189 .with(Opportunity.CampaignId)
190190 .max(Opportunity.Amount, 'maxAmount')
191191 .groupBy(Opportunity.CampaignId)
192- .toAggregate ();
192+ .toAggregated ();
193193```
194194
195195## MAX Related Field
@@ -206,7 +206,7 @@ FROM OpportunityLineItem
206206``` apex
207207SOQL.of(OpportunityLineItem.SObjectType)
208208 .max('Opportunity', Opportunity.Amount)
209- .toAggregate ();
209+ .toAggregated ();
210210```
211211
212212## MAX Related Field with Alias
@@ -223,7 +223,7 @@ FROM OpportunityLineItem
223223``` apex
224224SOQL.of(OpportunityLineItem.SObjectType)
225225 .max('Opportunity', Opportunity.Amount, 'maxAmount')
226- .toAggregate ();
226+ .toAggregated ();
227227```
228228
229229## COUNT
@@ -243,7 +243,7 @@ SOQL.of(Opportunity.SObjectType)
243243 .with(Opportunity.CampaignId)
244244 .count(Opportunity.Id, 'totalRecords')
245245 .groupBy(Opportunity.CampaignId)
246- .toAggregate ();
246+ .toAggregated ();
247247```
248248
249249## COUNT Related Field
@@ -260,7 +260,7 @@ FROM OpportunityLineItem
260260``` apex
261261SOQL.of(OpportunityLineItem.SObjectType)
262262 .count('Opportunity', Opportunity.Id)
263- .toAggregate ();
263+ .toAggregated ();
264264```
265265
266266## COUNT Related Field with Alias
@@ -277,7 +277,7 @@ FROM OpportunityLineItem
277277``` apex
278278SOQL.of(OpportunityLineItem.SObjectType)
279279 .count('Opportunity', Opportunity.Id, 'totalRecords')
280- .toAggregate ();
280+ .toAggregated ();
281281```
282282
283283## COUNT_DISTINCT
@@ -294,7 +294,7 @@ FROM Opportunity
294294``` apex
295295SOQL.of(Opportunity.SObjectType)
296296 .countDistinct(Opportunity.AccountId, 'uniqueAccounts')
297- .toAggregate ();
297+ .toAggregated ();
298298```
299299
300300## COUNT_DISTINCT Related Field
@@ -311,7 +311,7 @@ FROM OpportunityLineItem
311311``` apex
312312SOQL.of(OpportunityLineItem.SObjectType)
313313 .countDistinct('Opportunity', Opportunity.AccountId)
314- .toAggregate ();
314+ .toAggregated ();
315315```
316316
317317## COUNT_DISTINCT Related Field with Alias
@@ -328,5 +328,5 @@ FROM OpportunityLineItem
328328``` apex
329329SOQL.of(OpportunityLineItem.SObjectType)
330330 .countDistinct('Opportunity', Opportunity.AccountId, 'uniqueAccounts')
331- .toAggregate ();
331+ .toAggregated ();
332332```
0 commit comments