Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Table Samples

pofallon edited this page Aug 16, 2012 · 2 revisions

Scenario: Insert an entity with multiple data types into Azure table storage (using a system generated RowKey). Print all the rows to the console.

var storage = require('bluesky').storage();

var table = storage.table('test');

table.insert('mypartition', {name: 'Joe', age: 40, dev: false, today: new Date()}, function(err) {
  table.rows().on('data', function(row) {
  	console.dir(row);
  });
});

Scenario: Use a filter to retrieve only matching rows from Azure table storage.

var storage = require('bluesky').storage();

var table = storage.table('test');

table.filter({name:'Joe'}).rows().on('data', function(row) {
  console.dir(row);
});
Clone this wiki locally