File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ const avgScoreForUser =
49
49
The Aggregate component provides ` O(log(n)) ` -time lookups, instead of the ` O(n) `
50
50
that would result from naive usage of ` .collect() ` in Convex or ` COUNT(*) ` in MySQL or Postgres.
51
51
52
+ ## Examples
53
+
52
54
## What are Aggregates for?
53
55
54
56
With plain Convex indexes, you can insert new documents and you can paginate
@@ -149,6 +151,8 @@ The Aggregate component can efficiently calculate all of these:
149
151
where each page has 50 photos.
150
152
- [ Random access] ( #total-count-and-randomization ) : Look up a random song in a playlist, as the next song to play.
151
153
154
+ Try it out: https://aggregate-component-example.netlify.app/
155
+
152
156
## Pre-requisite: Convex
153
157
154
158
You'll need an existing Convex project to use the component.
@@ -299,6 +303,8 @@ To run the examples:
299
303
4 . The dashboard should open and you can run functions like
300
304
` leaderboard:addScore ` and ` leaderboard:userAverageScore ` .
301
305
306
+ Or play with them online at: https://aggregate-component-example.netlify.app/
307
+
302
308
### Total Count and Randomization
303
309
304
310
If you don't need the ordering, partitioning, or summing behavior of
Original file line number Diff line number Diff line change 1
1
# Example App
2
2
3
+ You can try out the examples online at: https://aggregate-component-example.netlify.app/
4
+
3
5
## To run the examples
4
6
5
7
Once you have cloned this repo, ** from the root of the repo** :
Original file line number Diff line number Diff line change
1
+ /* /index.html 200
2
+
You can’t perform that action at this time.
0 commit comments