🚀 Project Update:

Serverless MySQL: v1.1.0 Released

Serverless MySQL v1.1.0 adds additional transaction support to allow users to get interim query results. This is useful for getting the insertId from previous queries when performing transactions.

Transactions are extremely simple with Serverless MySQL. You just need to start a transaction, chain your queries, and then use the commit() method to execute them.

Now, with the new interim query results support, you can retrieve the results of the previous query by wrapping your query in a function and returning an array containing your new query’s attributes:

If you need to get the value of multiple queries, you can use the second argument instead:

Easy peasy 🍋! Check out the Serverless MySQL NPM module to see how simple it is to manage MySQL at Serverless Scale.

NPM: https://www.npmjs.com/package/serverless-mysql
GitHub: https://github.com/jeremydaly/serverless-mysql

Tags: , , , ,


Did you like this post? 👍  Do you want more? 🙌  Follow me on Twitter or check out some of the projects I’m working on.

Learn more about Serverless MySQL or check out the other projects I'm working on.

2 thoughts on “Serverless MySQL: v1.1.0 Released”

    1. Hi Samin,

      Knex.js uses its own interface into the mysql package, so I don’t think it is possible to use serverless-mysql with it. You might be able to monkey patch Knex, but you’d have to experiment.

      – Jeremy

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.