query =
'insert into ' +
table +
"( replyDate) values('" +
event.state.session.lastMessages
.map(function(elem) {
return elem.replyDate
})
.join(',') +
"')"
我有一个名为messages 的表,其中有一个名为replyDate 的列。event.state.session.lastMessages 包含一个 javascript 对象列表,如下所示:
[ { eventId: '14337275205243615', incomingPreview: 'bonjour', replyConfidence: 1, replySource: 'dialogManager', replyDate: '2021-05-04T16:40:07.242Z', replyPreview: '#!builtin_single-choice-mrFFU_' } ]
我想在我的数据库中保存值replyDate,但我收到错误:
Executing: insert into messages( replyDate) values('2021-05-07T11:33:36.721Z,2021-05-07T11:33:39.704Z,2021-05-07T11:33:42.414Z,2021-05-07T11:33:42.422Z,2021-05-07T11:33:49.454Z')
error: la colonne « replydate » de la relation « messages » n'existe pas