drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: Simplify column definition for Partial Select
Open
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
drizzle: 0.36.1
The goal is to simplify the selection of fields when doing a partial select:
```js
// current syntax
const result = await db.select({
id: users.id,
name: users.name,
}).from(users);
```
A more intuitive way would be this:
```js
// suggested syntax
const result = await db.select()
.fields(id, name)
.from(users);
// or
const result = await db.select()
.from(users)
.fields(id, name);
```
Contributor guide
Assessment
This issue has not been assessed yet.