nodejs-datastore icon indicating copy to clipboard operation
nodejs-datastore copied to clipboard

Is it possible to return `key identifier` in the properties

Open maxcc0 opened this issue 4 years ago • 0 comments

Hi, is it possible to return key identifier in the props (so that one doesn't have to loop through the entities to get ti)?

e.g.

Kind = User Key Identifier=auto-generated Properties=name, email

Snippet:

 const query = datastore.createQuery('User')
 const [entities] = await datastore.runQuery(query)
 console.log(entities)

Expected sample response:

[{
id: <key identifier>
name: '',
email: ''
},
{
id: <key identifier>
name: '',
email: ''
}]

maxcc0 avatar Oct 16 '21 15:10 maxcc0