You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Knex version: 0.21.19
Database + version: PostgreSQL 12
OS: Mac OS 11.2.1 (Big Sur)
Bug
Explain what kind of behaviour you are getting and how you think it should do
When trying to use the ~= operator that's supported by PostgreSQL, I get:
TypeError: The operator "~=" is not permitted
at Formatter.operator (node_modules/knex/lib/formatter.js:203:13)
at QueryCompiler_PG.whereBasic (node_modules/knex/lib/query/compiler.js:672:22)
at QueryCompiler_PG.where (node_modules/knex/lib/query/compiler.js:390:34)
at node_modules/knex/lib/query/compiler.js:115:69
at Array.map (<anonymous>)
at QueryCompiler_PG.select (node_modules/knex/lib/query/compiler.js:115:35)
at QueryCompiler_PG.toSQL (node_modules/knex/lib/query/compiler.js:61:29)
at Builder.toSQL (node_modules/knex/lib/query/builder.js:97:44)
[...project code]
Error message
TypeError: The operator "~=" is not permitted
Reduced test code, for example in https://npm.runkit.com/knex or if it needs real
database connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates the problem.
Environment
Knex version: 0.21.19
Database + version: PostgreSQL 12
OS: Mac OS 11.2.1 (Big Sur)
Bug
When trying to use the ~= operator that's supported by PostgreSQL, I get:
TypeError: The operator "~=" is not permitted
database connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates the problem.
This looks very similar to:
#3359
I went ahead and added it to the
operators
array informatters.js
locally and it worked. I'll prepare a PR with the change.The text was updated successfully, but these errors were encountered: