[英]Using Knex/Postgresql What Does This Mean? “error: column ”*“ does not exist”
I had a project that I shelved for awhile, but recently I dusted it off and updated all the NPM packages. 我有一个搁置了一段时间的项目,但最近我将其除尘并更新了所有NPM软件包。 Now when I try to do anything database related (using Knex/Postgresql) I get the error:
现在,当我尝试做任何与数据库相关的事情时(使用Knex / Postgresql),我得到了错误消息:
error: column "*" does not exist
This will happen with a seemingly harmless query like: 这将在看似无害的查询中发生,例如:
select "*" from "some_table" where "id" = $1
If I run that query directly against the DB: 如果我直接对数据库运行该查询:
select * from "some_table" where "id" = 1;
it works fine. 它工作正常。 But no matter what I try with knex, whether it's running a regular query or trying to reset my whole database, I keep getting that seemingly nonsensical error.
但是无论我使用knex尝试什么,无论是运行常规查询还是尝试重置我的整个数据库,我都会不断收到那个看似荒谬的错误。
Can anyone explain what it means? 谁能解释这是什么意思?
*
周围的双引号导致它不会被解释为“所有列”,而是被解释为具有该名称的列。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.