Skip to content

datastore: Filter a query on a key #73

@temsa

Description

@temsa

Hi !

We're pretty much in a hurry for now, hoping we will find some pretty live support here, so I'm quoting your name with hope it will help (sorry for that) : @silvolu @pcostell @rakyll

First, we had trouble with using the json key in 0.0.6 so we got back to pem file with version 0.0.5. But this is not about this issue.

We want to filter according to a non-ancestor Key. We have tried several things.

The naive one :

var q = ds.createQuery('Plop').limit(5).filter('fooAccountKey =', ['Mykind', 1243567])

It didn't work (Array not supported).

We then tried a more complicated one, looking at https://github.com/GoogleCloudPlatform/gcloud-node/blob/master/test/datastore.entity.js#L295 :

var q = ds.createQuery('Plop').limit(5).filter('fooAccountKey =', {
  partitionId: {
    datasetId: 's-my-app',
    namespace: ''
  },
  path: {
    kind: 'Mykind',
    id: '1243567'
  }
});

We are currently trying with a more "raw" request, using your tests for some help, still we don't get yet how to run a raw request directly ; we tried raw request with ds.runQuery(query).execute(), but no luck yet, maybe our raw request is not good yet

Keep up the good job, we'll probably contribute by our own soon :)

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions