The reason I am thinking of something like this is because I want to
access Dynamodb and I don't want to use anything more than
javascript . I found node.js client for Dynamo on github
https://github.com/jed/dynamo.
I have no clue if I can use node.js in my closure js file. I want to
know if and how I can use code like this in my closure js file.
var dynamo = require("dynamo")
, client = dynamo.createClient()
, db = client.get("us-east-1")
// High-level API
db.get("myTable")
.query({id: "123", date: {">=": new Date - 6000 }})
.get("id", "date", "name")
.reverse()
.fetch(function(err, data){ ... })
// Same call, using low-level API
db.query({
TableName: "myTable",
HashKeyValue: {S: "123"},
RangeKeyValue: {
ComparisonOperator: "LE",
AttributeValueList: [{N: "1329912311806"}]
},
AttributesToGet: ["id", "date", "name"],
ScanIndexForward: false
}, function(err, data){ ... })
Appreciate any help or guidance.
regards,
Ramesh