1.0.1 • Published 6 years ago
azure-table-helpers v1.0.1
azure-table-helpers
Use Azure Tables more smoothly, with promises instead of callbacks.
Prerequisites
To use this package, you need to have the following environment vartiables defined :
AzureWebJobsStorageAZURE_STORAGE_CONNECTION_STRING
Installing
Use npm to install this package :
npm i azure-table-helpers
Usage
const tableHelpers = require('azure-table-helpers')
The following helpers are exposed:
- resolveEntity :
 
tableHelpers.resolveEntity(table, partition, rowKey).then(console.log)
// $: {
  PartitionKey: 'PK',
  RowKey: 'RK',
  attribut: 'value',
  ...
}- resolveQuery :
 
tableHelpers.resolveQuery(table, query).then(console.log)
// $: [{
  PartitionKey: 'PK',
  RowKey: 'RK1',
  attribut: 'value',
  ...
},{
  PartitionKey: 'PK',
  RowKey: 'RK2',
  attribut: 'value',
  ...
}]All the Azure Storage Table functions are available, and return promise resolving with the result parameter of the original callback, and rejecting with the error parameter of the original callback.