首页 > 代码库 > node-postgres有个坑
node-postgres有个坑
社区包: https://www.npmjs.com/package/pg
开源地址:https://github.com/brianc/node-postgres/
我定义的数据库列名是大小写 , 查询语句也是大小写,结果提示
error: column "" does not exist
at Connection.parseE (node_modules\pg\lib\connection.js:569:11)
at Connection.parseMessage (node_modules\pg\lib\connection.js:396:17)
at Socket.<anonymous> (node_modules\pg\lib\connection.js:132:22)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:153:18)
at Socket.Readable.push (_stream_readable.js:111:10)
at TCP.onread (net.js:537:20)
然后我在 https://github.com/brianc/node-postgres/issues/195 找到了答案
var queryText = ‘select "firstName" from "User"‘
Cheers
node-postgres有个坑
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。