Skip to content

Commit

Permalink
Merge pull request #165 from dojoengine/edits
Browse files Browse the repository at this point in the history
components to models
  • Loading branch information
ponderingdemocritus authored Dec 21, 2023
2 parents 24d95da + da7b9c2 commit 6fe0ab7
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 71 deletions.
2 changes: 1 addition & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
- [execute](./toolchain/sozo/world-commands/execute.md)
- [register](./toolchain/sozo/world-commands/register.md)
- [system](./toolchain/sozo/world-commands/system.md)
- [component](./toolchain/sozo/world-commands/component.md)
- [model](./toolchain/sozo/world-commands/model.md)
- [events](./toolchain/sozo/world-commands/events.md)
- [auth](./toolchain/sozo/world-commands/auth.md)
- [Katana](./toolchain/katana/overview.md)
Expand Down
2 changes: 1 addition & 1 deletion src/toolchain/sozo/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
- [execute](./world-commands/execute.md)
- [register](./world-commands/register.md)
- [system](./world-commands/system.md)
- [component](./world-commands/component.md)
- [model](./world-commands/model.md)
- [events](./world-commands/events.md)
- [auth](./world-commands/auth.md)
69 changes: 0 additions & 69 deletions src/toolchain/sozo/world-commands/component.md

This file was deleted.

71 changes: 71 additions & 0 deletions src/toolchain/sozo/world-commands/model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# models

## sozo model

`model` is used to interact with a World's models. It is useful for querying about a model's information, or a model value of an entity.

### USAGE

```sh
sozo model <COMMAND>

Commands:
get Get the class hash of a model
schema Retrieve the schema for a model
entity Get the model value for an entity
```

### SUBCOMMANDS

#### `get`

Get the class hash of a model

```sh
sozo model get <NAME>
```

##### Arguments

_`NAME`_
&nbsp;&nbsp;&nbsp;&nbsp;The name of the model

#### `schema`

Retrieve the schema for a model

```sh
sozo model schema <NAME>
```

##### Arguments

_`NAME`_
&nbsp;&nbsp;&nbsp;&nbsp;The name of the model

#### `entity`

Get the model value for an entity

```sh
sozo model entity <NAME> [KEYS]...
```

##### Arguments

_`NAME`_
&nbsp;&nbsp;&nbsp;&nbsp;The name of the model

_`KEYS`_
&nbsp;&nbsp;&nbsp;&nbsp;The keys of the entity that you want to query.
&nbsp;&nbsp;&nbsp;&nbsp;Comma separated values e.g., 0x12345,0x69420,...

### OPTIONS

#### World Options

{{#include ../common/world-options.md}}

#### Starknet Options

{{#include ../common/starknet-options.md}}

0 comments on commit 6fe0ab7

Please sign in to comment.