我想在dynamodb上做表扫描下面是javascript中的代码
var params = {
TableName: 'Contacts',
FilterExpression: 'begins_with(CustomerName,:value)OR begins_with(CustomerName,:val) ',
ExpressionAttributeValues: {
':value': {'S':'S'},
':val':{'S':'E'},
},
Select: 'ALL_ATTRIBUTES',
};
dynamodb.scan(params, function(err, data) {
if (err) ppJson(err); // an error occurred
else ppJson(data); // successful response
});
Run Code Online (Sandbox Code Playgroud)
但我不能尝试使用botot3.
以下是我迄今为止可以实现的目标
response = table.scan(
Select= 'ALL_ATTRIBUTES',
FilterExpression=Attr('CustomerName').begins_with("S")
)
Run Code Online (Sandbox Code Playgroud)
我无法理解如何添加OR条件.如果我添加,则显示错误
当我试图运行我的第一个具有以下内容的js文件时,我对nodejs很新
var http = require("http");
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
}).listen(8081);
console.log('Server running at http://127.0.0.1:8081/');
Run Code Online (Sandbox Code Playgroud)
用命令
$ node fullpath/filename.js
任何人都可以说出错了什么.我正在使用nodejs应用程序窗口