Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are MySQL 8 Features like CTE Supported? #5489

Open
jdevries3133 opened this issue Feb 14, 2023 · 0 comments
Open

Are MySQL 8 Features like CTE Supported? #5489

jdevries3133 opened this issue Feb 14, 2023 · 0 comments

Comments

@jdevries3133
Copy link

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

src

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!

@jdevries3133 jdevries3133 changed the title Does knex.where support MySQL? Do MySQL 8 Features like CTE Work with Knex? Feb 15, 2023
@jdevries3133 jdevries3133 changed the title Do MySQL 8 Features like CTE Work with Knex? Are MySQL 8 Features like CTE Supported? Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant