google datastore transactions

175
February 06, 2018, at 2:11 PM

I am having a lot of issues with google cloud datastore & transactions.

I am building a react/nodeJS web app. For the database I am using google cloud datastore. I use the emulator (google cloud datastore emulator) for local development.

The time has come for transactions. Unfortunately for me I cannot seem to instantiate a transaction object. I have wrapped the problem statement in console log. Example code:

console.log('before transaction()')
const transaction = datastore.transaction();
console.log('after transaction()')

Actually output:

before transaction()

Expected output:

before transaction()
after transaction()

I don't get any error message.

Note: I am certain I have instantiated my datastore object correctly because I can execute queries against the emulator and real db. The problem is specific to calling datastore.transaction(), as shown in the above example code.

Questions:

  • Is this issue specific to google cloud emulator?
  • Is the documentation of the API out dated?

Here are the links to google cloud datastore transaction docs: https://cloud.google.com/nodejs/docs/reference/datastore/1.3.x/Transaction

READ ALSO
How I can download/pull deployed apps and services from Cloud Foundry on IBM Cloud/Bluemix?

How I can download/pull deployed apps and services from Cloud Foundry on IBM Cloud/Bluemix?

The app (Nodejs) is deployed on Cloud Foundry (IBM Cloud, US-South) by my previous colleague, but the codes in our private Github (seperate from IBM DevOps) for local testing doesn't look the same as what he has deployed on Cloud Foundry

183
Is it fine to create an ecommerce with node js and woocommerce ( woocommerce as admin to manage products and orders)?

Is it fine to create an ecommerce with node js and woocommerce ( woocommerce as admin to manage products and orders)?

I just want to create a fast ecommerce platform where I can implement NodeJs as the main guyTo maintain products and orders can I use Woocommerce

196
Difference between connection timeout and socket timeout

Difference between connection timeout and socket timeout

anybody can explain diff between socket timeout and connection timeout in HTTP callAnd how can identify its connection timeout or socket timeout

262
How to retrieve error/message codes in clickatell-node api?

How to retrieve error/message codes in clickatell-node api?

How can i receive exact message or error codes using clickatell-node api?

249