GQL поддерживает обычно доступное агрегирование Стиля SQL?

Пояснение: замените число в i на 1 , чтобы оно не мешало умножению. Кроме того, примените заполнение к копии из a , следовательно, [... a]

[111 ]

console.log( [2,3,4,5].map( (n,i,a) => [...a].fill(1,i,i+1).reduce( (a,b) => a*b ) ) )

6
задан cletus 13 May 2009 в 07:18
поделиться

2 ответа

The SQL aggregate functions are not available. What you want to do is follow patterns like the sharded counters example: http://code.google.com/appengine/articles/sharding_counters.html which explain that instead of aggregating the values on queries, you want to keep the counters up to date when the values are inserted, updated, or deleted.

The example takes the concept a bit further than just maintaining the aggregates in that it will explain how to make it so that you can update the counters under high load where you have a limited amount of opportunity to write to your counters - so the shards help you distribute the load over several instances.

9
ответ дан 10 December 2019 в 02:53
поделиться
[115021 Нет, он их вообще не поддерживает.

0
ответ дан 10 December 2019 в 02:53
поделиться
Другие вопросы по тегам:

Похожие вопросы: