drizzle-team / drizzle-team/drizzle-orm
[BUG]: insert().values().execute() returns different value between planetscale mysql2
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### What version of `drizzle-orm` are you using?
0.27.0
### What version of `drizzle-kit` are you using?
_No response_
### Describe the Bug
The following code:
```ts
const result = await database
.insert(table)
.values({ ... })
.execute();
```
returns different `result` between `drizzle-orm/mysql2` and `drizzle-orm/planetscale-serverless`.
With `drizzle-orm/mysql2`, `result` is an array and doesn't match the typescript definition:
```
[
ResultSetHeader {
fieldCount: 0,
affectedRows: 1,
insertId: 1110,
info: '',
serverStatus: 3,
warningStatus: 0
},
undefined
]
```
When using `drizzle-orm/planetscale-serverless`, accesing `result.insertId` works directly.
### Expected behavior
Both should return the same thing, probably `ExecutedQuery` or `ResultSetHeader`
### Environment & setup
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.