Return object instead of an array when inserting object

How can I get the insert statement to return the inserted object instead of an array, when I am only inserting one row? const insertedRole = await db.insert(role).values(insertRole).returning();
1 Reply
DiamondDragon
DiamondDragon6mo ago
[insertedRole] destructs item 0
Want results from more Discord servers?
Add your server