0

I'm attempting to run a very simple query from Javascript against the Google Cloud Datastore, and no matter what I do, it always seems to just return empty results. My request is being made from a fully authenticated (OAuth2) GAPI client. Here's the relevant code:

var gqlQuery = 'SELECT * FROM swell';    

var request = gapi.client.datastore.datasets.runQuery({
    datasetId : datasetId, 
    gqlQuery: {queryString: gqlQuery}
});

request.execute(function(err, result) {
    ...... Process the results ...... 
}

I'm using a datasetId that I know is valid. I've tried switching err and result in the callback function, but it doesn't help. No matter what I do, my err and result callback parameters just seem to be blank object collections.

  • You have a slightly different error scenario, but it looks like you may be having the same problem as this question: http://stackoverflow.com/questions/31094523/error-every-time-i-run-datastore-runquery-one-of-fields-query-query-and-query-g – Patrick Costello Jun 30 '15 at 02:34
  • It does look like a similar issue, but I tried the suggested approach with the "resource" section and it didn't seem to have any effect. – Todd Nakamura Jun 30 '15 at 03:09
  • Can you verify that you have an entity in your Datastore with the "swell" kind? – Patrick Costello Jun 30 '15 at 03:25
  • Or even better, show the request/response using the API Explorer. – Patrick Costello Jun 30 '15 at 03:26
  • are you sorting/filtering? what queries are you running? – jirungaray Jun 30 '15 at 10:59
  • I wanted to add a screenshot, but apparently I don't have enough reputation yet. That being said, I can confirm 100% that I have 2 entities of "swell" kind under the datasetId that I'm connecting to. – Todd Nakamura Jun 30 '15 at 15:04
  • @jirungaray I'm not doing any sorting or filtering at all. I'm just trying to simply return entities from my datastore. I've been trying to run the gqlQuery that you can see in the original post. I've also tried using the "kinds" and "query" properties, but the results have been the same. – Todd Nakamura Jun 30 '15 at 15:35

0 Answers0