Skip to content

Commit

Permalink
getting started
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekwuno committed Oct 8, 2024
1 parent a6e605f commit 90ddd93
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/content/doc-sdk-rust/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import Label from "@components/shared/Label.astro";
}}
/>

### Add the SDK
### Getting Started

First, create a new project using `cargo new` and add the following dependencies:

Expand Down Expand Up @@ -87,7 +87,7 @@ async fn main() -> surrealdb::Result<()> {

Note that the `.query()` method is able to hold more than one statement, in this case three: two [`RETURN`](/docs/surrealql/statements/return) statements and one [`SELECT`](/docs/surrealql/statements/return) statement. The `Response` struct returned contains a field called `results` which holds the output of each statement. Note that each result has its own index. This will become useful when using the `.take()` method in the example to follow, which can access a result by its index number.

```bash
```surql title="Example output"
results: {
0: (
Stats {
Expand Down Expand Up @@ -296,7 +296,3 @@ Here is the last query in the example above to get started:
```surql
SELECT marketing, count() FROM person GROUP BY marketing;
```

Helpful methods and types

sql::thing()

0 comments on commit 90ddd93

Please sign in to comment.