Skip to content

Commit

Permalink
feat: restrict insert result to insertId
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Mar 25, 2017
1 parent f0f4bff commit 1c547ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export {
export const insert: QueryInsertType = async (connection, sql, values?) => {
const [result] = await connection.query(sql, values);

return result;
return {
insertId: result.insertId
};
};

/**
Expand Down

0 comments on commit 1c547ec

Please sign in to comment.