Skip to content

Commit 99cbca4

Browse files
committed
fix sidebar ordering
1 parent f9f6c4e commit 99cbca4

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/content/docs/agents/api-reference/index.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
title: Agents API Reference
33
pcx_content_type: navigation
44
sidebar:
5-
order: 3
5+
order: 5
66
group:
77
hideIndex: true
8-
98
---
109

1110
import { DirectoryListing } from "~/components"

src/content/docs/agents/building-with-ai/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Building with AI
33
pcx_content_type: navigation
44
sidebar:
5-
order: 5
5+
order: 4
66
group:
77
hideIndex: true
88

src/content/docs/agents/concepts/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: reference
33
title: Concepts
44
sidebar:
5-
order: 1
5+
order: 2
66
group:
77
hideIndex: true
88
---

src/content/docs/agents/examples/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
pcx_content_type: reference
3-
title: Build
3+
title: Examples
44
sidebar:
5-
order: 4
5+
order: 3
66
---
77

88
import { DirectoryListing, PackageManagers } from "~/components";

src/content/docs/agents/examples/manage-and-sync-state.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,15 @@ export class MyAgent extends Agent<Env> {
144144
async onRequest(request: Request) {
145145
let userId = new URL(request.url).searchParams.get('userId');
146146
// Supply the type paramter to the query when calling this.sql
147-
// This assumes the results return a single User row with "id", "name", and "email" columns
148-
// You can also pass an array as the type argument to the query - e.g. User[]
147+
// This assumes the results returns one or more User rows with "id", "name", and "email" columns
149148
const user = await this.sql<User>`SELECT * FROM users WHERE id = ${userId}`;
150149
return Response.json(user)
151150
}
152151
}
153152
```
154153

154+
You do not need to specify an array type (`User[]` or `Array<User>`) as `this.sql` will always return an array of the specified type.
155+
155156
Providing a type parameter does not validate that the result matches your type definition. In TypeScript, properties (fields) that do not exist or conform to the type you provided will be dropped. If you need to validate incoming events, we recommend a library such as [zod](https://zod.dev/) or your own validator logic.
156157

157158
:::note
@@ -160,4 +161,4 @@ Learn more about the zero-latency SQL storage that powers both Agents and Durabl
160161

161162
:::
162163

163-
The SQL API exposed to an Agent is similar to the one [within Durable Objects](/durable-objects/api/sql-storage/). This means that you can use the same SQL queries with the Agent's database, create tables, and query data.
164+
The SQL API exposed to an Agent is similar to the one [within Durable Objects](/durable-objects/api/sql-storage/): Durable Object SQL methods available on `this.ctx.storage.sql`. You can use the same SQL queries with the Agent's database, create tables, and query data, as you would with Durable Objects or D1, as the dialect is the same.

src/content/docs/agents/getting-started/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Getting started
33
pcx_content_type: navigation
44
sidebar:
5-
order: 2
5+
order: 1
66
group:
77
hideIndex: true
88

0 commit comments

Comments
 (0)