drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: Accept callbacks in where clause when using update query

Open
#3,524 2 comments 4 reactions 0 assignees View on GitHub
enhancement qb/crud
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Feature hasn't been suggested before.

- [X] I have verified this feature I'm about to request hasn't been suggested before.

### Describe the enhancement you want to request

This is how to update a user row stated in the documentation. However, if I'm using a monorepo project and I don't want to add drizzle-orm as another dependency again, I want to be able to provide where clause with callback functions similar to **select** query
### Update user row based on documentation
```typescript
await db.update(users)
.set({ updatedAt: sql`NOW()` })
.where(eq(users.name, 'Dan'));
```

### What I want to archive
```typescript
await db.update(users)
.set({ updatedAt: sql`NOW()` })
.where(userTables, { eq } => eq(users.name, 'Dan'));
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.