Skip to content

Commit 9366a77

Browse files
brainkimclaude
andcommitted
docs: fix README table naming consistency
- Rename Custom → Articles (more descriptive) - Fix UserSummary → UserSummaries (consistent plural naming) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 104b225 commit 9366a77

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ settings.tags[0]; // "admin" (array, not string)
264264
Override automatic JSON encoding with custom transformations:
265265

266266
```typescript
267-
const Custom = table("custom", {
267+
const Articles = table("articles", {
268268
id: z.string().db.primary(),
269269
// Store array as CSV instead of JSON
270270
tags: z.array(z.string())
@@ -273,8 +273,8 @@ const Custom = table("custom", {
273273
.db.type("TEXT"), // Required: explicit column type for DDL
274274
});
275275

276-
await db.insert(Custom, {id: "c1", tags: ["a", "b", "c"]});
277-
// Stored as: tags='a,b,c' (not '["a","b","c"]')
276+
await db.insert(Articles, {id: "a1", tags: ["news", "tech", "featured"]});
277+
// Stored as: tags='news,tech,featured' (not '["news","tech","featured"]')
278278
```
279279

280280
**Explicit column types:**
@@ -397,8 +397,8 @@ Derived properties:
397397
**Partial selects** with `pick()`:
398398
```typescript
399399
const UserSummaries = Users.pick("id", "name");
400-
const posts = await db.all([Posts, UserSummary])`
401-
JOIN ${UserSummaries} ON ${UserSummary.on(Posts)}
400+
const posts = await db.all([Posts, UserSummaries])`
401+
JOIN ${UserSummaries} ON ${UserSummaries.on(Posts)}
402402
`;
403403
// posts[0].author has only id and name
404404
```

0 commit comments

Comments
 (0)