【发布时间】:2017-06-16 18:47:00
【问题描述】:
我正在使用pgp.helpers.insert 将数据保存到运行良好的 PostgreSQL 中。但是,我需要返回值以呈现在响应中。我正在使用:
this.collection.one(this.collection.$config.pgp.helpers.insert(values, null, 'branch'))
不返回任何数据。
我希望能够在插入成功后返回分支id,如:
INSERT into branch (columns) VALUES (values) RETURNING pk_branchID
【问题讨论】:
标签: node.js postgresql pg-promise