我将尝试运行以下查询:
但是它给出了错误提示:
let query =
`
DELETE FROM
${table_name}
WHERE
_id IN ($1::bigint[])
AND
account_id = $2
`
let fields =
[
_ids,
account_id,
]
但是它给出了错误提示:
operator does not exist: bigint = bigint[]
_ids
是一个数组。
注意
实施答案后我遇到的错误是:
GraphQLError: Int cannot represent non-integer value: []
这只是一个GraphQL错误,与Postgres无关。
GraphQLError: Int cannot represent non-integer value: []
。难道不应该是bigint吗?因为_id
是bigserial
。 - A. L