Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

components to models #165

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}}