Created
October 26, 2012 09:09
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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