【发布时间】:2022-10-04 16:40:46
【问题描述】:
尽管生成的 SQL 返回正确的结果集,但在使用 regex_matches 时 knex 返回空结果。使用 knexv2.3.0 和 pg8.2.1。
IE。
knex("v_domains").select("domain_uuid", knex.raw("(REGEXP_MATCHES(domain_description, 'rid:(.*?)//'))[1] as reseller_id")).debug(true)
{
方法:'选择',
选项: {},
超时:假,
取消超时:假,
绑定:[],
__knexQueryUid: 'ROyC62-HHob0AiJzffMee',
sql:select "domain_uuid", (REGEXP_MATCHES(domain_description, 'rid:(.*?)//'))[1] as reseller_id from "v_domains"
}
对此的任何帮助将不胜感激:)
【问题讨论】:
标签: node.js postgresql knex.js