Reputation: 447
We are currently using NodeJs with Knex for connecting with MySQL.
We have plans to migrate our database to Cloud Spanner.
So wanted to know, if knexjs has support for cloud spanner.
I did not see any related articles in their official website (http://knexjs.org/).
If not, any ORM which has support to both MySQL and Cloud Spanner which will have minimal changes from knexjs
Upvotes: 2
Views: 816
Reputation: 447
We continued using Knexjs for our Spanner operations. It is working fine so far. We build the queries using knex and convert it to raw queries using
querybuilder.toSQL()
and binding the parameters.
Upvotes: 2
Reputation: 4899
The Google public docs list the different libraries that can be used with Google Cloud Spanner. You can use node.js with Cloud Spanner so I believe the knexjs should also work. A recommendation is to modify your code so that knexjs outputs the SQL command to help with debugging in case certain commands don't work
Upvotes: -1