node.js - 如何使用 Node.js 从 Azure 表存储获取表列表?

标签 node.js azure azure-table-storage

我在 node.js 模块中使用 azure-storage-node 包。我可以创建表和实体,但我看不到如何从存储容器中获取表列表。我该怎么做?

最佳答案

您需要调用listTablesSegmented方法来列出表格。

var azure = require('azure-storage');
var tableSvc = azure.createTableService('account-name', 'account-key');

tableSvc.listTablesSegmented(null, function(error, result) {
  if (!error) {
    var entries = result.entries;
    for (var i=0; i<entries.length; i++) {
      console.log(entries[i]);//prints table name
    }
  }
});

关于node.js - 如何使用 Node.js 从 Azure 表存储获取表列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53174291/

相关文章:

c# - 如何通过 C# 在 Azure 表中监听新记录插入

node.js - 使用 Yarn 安装时,是否也会检查所有依赖项的锁?

.net - Windows Azure 获取 InstanceInputEndpoint 的外部 DNS

azure - 如何使用Azure函数Binder查询运行时指定的Table?

php - 我在使用 Azure 登录时跳过了权限请求接口(interface)。提供了 'Grant admin consent' 权限。但 MFA 现在禁用

App Insights 升级到 2.5 后,Azure 应用服务将无法启动

azure - Azure 表存储的替代方案

eclipse - 如何设置nodejs Debug模式不听127.0.0.1

javascript - 使用 package.json 脚本运行另一个 package.json 脚本

node.js - 使用 nginx 和 node.js 上传文件