Skip to content

Commit b41a091

Browse files
authored
Remove calling other contracts (#22)
1 parent 0e9f252 commit b41a091

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

collections.mdx

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -175,37 +175,6 @@ const col = db.collection("account");
175175
await col.record("id1").call("transfer", [c.record("id2"), 10]);
176176
```
177177

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-
209178

210179
### Indexes
211180

0 commit comments

Comments
 (0)