You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For almost all of my project I used MySQL database and autoincrement ids. After executing an insert statement, I expect to get an id of the thing I just have inserted. But it is not the case with drizzle orm, since MySQL does not support returning statement. That means that here is no convenient way to freshly generated id of a row I just inserted.
But it doesn't have to be that way. Both mysql2 and @planetscale/database support returning insert id from insert statement, and I am pretty sure it is also possible in http proxy. As for now, drizzle lacks functionality to return insert id. I suggest adding a new method to drizzle's query builder called .returnInsertId(). The method should return a single value or a list of values depending on how many rows have been inserted.
The text was updated successfully, but these errors were encountered:
Describe what you want
For almost all of my project I used MySQL database and autoincrement ids. After executing an insert statement, I expect to get an id of the thing I just have inserted. But it is not the case with drizzle orm, since MySQL does not support returning statement. That means that here is no convenient way to freshly generated id of a row I just inserted.
But it doesn't have to be that way. Both mysql2 and @planetscale/database support returning insert id from insert statement, and I am pretty sure it is also possible in http proxy. As for now, drizzle lacks functionality to return insert id. I suggest adding a new method to drizzle's query builder called
.returnInsertId()
. The method should return a single value or a list of values depending on how many rows have been inserted.The text was updated successfully, but these errors were encountered: