File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -175,37 +175,6 @@ const col = db.collection("account");
175
175
await col .record (" id1" ).call (" transfer" , [c .record (" id2" ), 10 ]);
176
176
```
177
177
178
- ### Calling other collections
179
-
180
- You can define a parameter of a function to accept a record from another collection, allowing you
181
- to perform atomic updates to multiple records from different collections.
182
-
183
- ``` js
184
- collection Account {
185
- id: string;
186
- name?: string;
187
-
188
- constructor (id : string , counter : Counter ) {
189
- this .id = ctx .publicKey ;
190
- counter .incr ()
191
- }
192
- }
193
-
194
- collection Counter {
195
- id: string;
196
- count: number;
197
-
198
- constructor (id : string ) {
199
- this .id = id;
200
- this .count = 0 ;
201
- }
202
-
203
- incr () {
204
- this .count += 1 ;
205
- }
206
- }
207
- ```
208
-
209
178
210
179
### Indexes
211
180
You can’t perform that action at this time.
0 commit comments