AWS Lambda NodeJS中多个输入事件参数的正确语法 [英] Right syntax for multiple input event params in AWS Lambda NodeJS

查看:150
本文介绍了AWS Lambda NodeJS中多个输入事件参数的正确语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以通过多个输入事件参数帮助我在Lambda Nodejs中更正此代码.

Can anyone help me correct with this code in Lambda Nodejs with multiple input event params.

我已经尝试过以下方法,但是没有运气!

I've tried already the following but no luck!

ABC = ? WHERE XYZ = ?;', event['ABC', 'XYZ'], function (error, results, fields)

ABC = ? WHERE XYZ = ?;', event['ABC']['XYZ'], function (error, results, fields)

ABC = ? WHERE XYZ = ?;', event['ABC'], event['XYZ'], function (error, results, fields)

推荐答案

下面应使用的正确语法.

The correct syntax that you should be using is below.

通过这样做,您可以将它们作为列表提供.

By doing this you're providing them as a list.

event['ABC', 'XYZ']是无效的语法.

event['ABC']['XYZ']event['ABC']内寻找XYZ键.

event['ABC'], event['XYZ']传递了许多参数.

ABC = ? WHERE XYZ = ?;', [event['ABC'], event['XYZ']], function (error, results, fields)

这篇关于AWS Lambda NodeJS中多个输入事件参数的正确语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆