Skip to content

Commit

Permalink
Merge pull request #166 from dojoengine/edits
Browse files Browse the repository at this point in the history
adds delete macro docs
  • Loading branch information
ponderingdemocritus authored Dec 21, 2023
2 parents 37e1e34 + e858a4e commit 7c299d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cairo/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,12 @@ The `emit!` command is used to emit custom events. These events are indexed by [
emit!(world, Moved { address: caller, direction });
```

### The `delete!` command

The `delete!` command deletes a model from the db.

```rust,ignore
delete!(world, Moved { address: caller, direction });
```

This will emit these values which could be captured by a client or you could query these via [Torii](../toolchain/torii/overview.md).

0 comments on commit 7c299d3

Please sign in to comment.