Skip to content

Instantly share code, notes, and snippets.

@jbueza
Created October 26, 2012 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbueza/3957765 to your computer and use it in GitHub Desktop.
Save jbueza/3957765 to your computer and use it in GitHub Desktop.
Provides an easy way of retrieving a specific entity by Partition and RowKey.
var Dre = require("dre");
var dre = new Dre(account); // account is just a JSON object with your Azure Storage keys
var Person = dre.model("People", dre.Schema({
FirstName: "string",
LastName: "string"
}));
Person.findOne({
PartitionKey: "dcb83fa0-15c4-463f-99b7-2ce365878b20",
RowKey: "58f92ada-2aa9-48f8-9429-4580e0f91b81"
}, function(err, entity, response) {
console.log("Found you! ", entity);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment