azure-docs-sdk-node
azure-docs-sdk-node copied to clipboard
No sample code provided for listEntities
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.
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);
}