Closed Weronnip closed 1 month ago
It is because you are not using returning
as described here - https://orm.drizzle.team/docs/insert#insert-returning
The scope of this package is only to integrate Drizzle in NestJS. Please ask Drizzle related queries in its repo 🙏
My code:
async createUser(@Body() createUserDto: CreateUserDto) { const newUser = await this.drizzleTrello .insert(schema.Users) .values({ data: createUserDto }); return { newUser: newUser, }; }
{ "newUser": [ { "fieldCount": 0, "affectedRows": 1, "insertId": 27, "info": "", "serverStatus": 2, "warningStatus": 0, "changedRows": 0 }, null ] }