Skip to content

Commit

Permalink
Fix typo in Reading Data (#32646)
Browse files Browse the repository at this point in the history
Fixes: #1
GitOrigin-RevId: 2a0f71b20b77f2c3d9d2ed5a66e7b24978b34deb
  • Loading branch information
ikhare authored and Convex, Inc. committed Dec 27, 2024
1 parent a0204c3 commit 13331f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/database/reading-data/reading-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ If you aren't familiar with how to create a Convex schema, read the
[schema doc](/docs/database/schemas.mdx).

Let’s assume you’re building a chat app and want to get all messages in a
particular channel. You can define a new index called `by_channel` in the
particular channel. You can define a new index called `by_channel` on the
`messages` table by using the `.index()` method in your schema.

```ts noDialect title="convex/schema.ts"
import { defineSchema, defineTable } from "convex/server";
import { v } from "convex/values";

// Define a messages table with two indexes.
// Define a messages table with an index.
export default defineSchema({
messages: defineTable({
channel: v.id("channels"),
Expand Down

0 comments on commit 13331f5

Please sign in to comment.