azure-docs-sdk-node icon indicating copy to clipboard operation
azure-docs-sdk-node copied to clipboard

No sample code provided for listEntities

Open bcazur opened this issue 3 years ago • 1 comments

The documentation quality is rather poor, as it doesn't provide a sample for a very basic scenario: query using a filter. We would expect at least one example with a filter on RowKey or on PartitionKey.

bcazur avatar Jan 24 '22 14:01 bcazur

For whom it may interest, here is how to listEntities using a filter (sample table Users using email as RowKey).


  const tableClient = new AzureTables.TableClient(`https://${account}.table.core.windows.net`, "Users",
    credential);

  let entities = tableClient.listEntities({queryOptions:{filter: `RowKey eq '${email}'`}});
  for await (const entity of entities) {
    context.log(entity);


  }

bcazur avatar Jan 24 '22 14:01 bcazur