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

I want to know which properties of the retrieved entity are excluded from the index.

Open malt03 opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. I want to know which properties of the retrieved entity are excluded from the index. Describe the solution you'd like Allow the value of exclude_from_indexes, defined in Protocol buffer, to be retrieved through the library. Describe alternatives you've considered None. Additional context None.

malt03 avatar Apr 19 '22 01:04 malt03

https://github.com/googleapis/nodejs-datastore/compare/main...mish-tv:main

I believe that adding a new EXCLUDE_FROM_INDEXES_SYMBOL and adding a value to the entity object would add feature with less scope of influence.

malt03 avatar Apr 19 '22 02:04 malt03

Related request: https://github.com/googleapis/nodejs-datastore/issues/1111

calsmith avatar May 22 '23 14:05 calsmith

When you say the retrieved entity then are you referring to when datastore.get is used or when datastore.runQuery is used?

danieljbruce avatar May 31 '23 18:05 danieljbruce

I can confirm that entity.properties at https://github.com/googleapis/nodejs-datastore/blob/ba8ea831e317794abd6a5d5a5d61b96c6c794855/src/request.ts#L309 includes an excludeFromIndexes field so I think this can be included here. We just need to parse it properly in this function.

danieljbruce avatar May 31 '23 18:05 danieljbruce