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
Common table expressions were introduce to MySQL in v8. Knex has some issues with MySQL 8 stemming from the MySQL 8 driver not being supported by mysqljs, which I assume that knex depends on; see mysqljs/mysql#1959.
Regardless of this underlying driver incompatibility, it seems that CTE expressions crafted with the .with method of knex's query builder are working against MySQL in practice.
The knex docs, however, document that this usage is not supported:
"With" clauses are supported by PostgreSQL, Oracle, SQLite3 and MSSQL
Is this compatibility in practice accidental? Is it tested? Should it be documented to work? Should the .with method throw an exception or emit a warning if used with MySQL because the use case is unsupported?
Thanks!
The text was updated successfully, but these errors were encountered:
jdevries3133
changed the title
Does knex.where support MySQL?
Do MySQL 8 Features like CTE Work with Knex?
Feb 15, 2023
jdevries3133
changed the title
Do MySQL 8 Features like CTE Work with Knex?
Are MySQL 8 Features like CTE Supported?
Feb 15, 2023
Common table expressions were introduce to MySQL in v8. Knex has some issues with MySQL 8 stemming from the MySQL 8 driver not being supported by mysqljs, which I assume that knex depends on; see mysqljs/mysql#1959.
Regardless of this underlying driver incompatibility, it seems that CTE expressions crafted with the
.with
method of knex's query builder are working against MySQL in practice.The knex docs, however, document that this usage is not supported:
Is this compatibility in practice accidental? Is it tested? Should it be documented to work? Should the
.with
method throw an exception or emit a warning if used with MySQL because the use case is unsupported?Thanks!
The text was updated successfully, but these errors were encountered: