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

mysql warn `.returning()` does not have any effect. #3039

Merged
merged 2 commits into from Mar 3, 2019

Conversation

Projects
None yet
2 participants
@HurSungYun
Copy link
Contributor

HurSungYun commented Feb 7, 2019

In SQLite3, users can be warned that .returning() has no effect.

https://github.com/tgriesser/knex/blob/master/src/dialects/sqlite3/query/compiler.js#L18

For consistency, how about MySQL users to be warned as well?

@elhigu

This comment has been minimized.

Copy link
Collaborator

elhigu commented Feb 7, 2019

Tests are missing and I'm not sure if this should be an exception and thrown earlier than compilation phase.

@elhigu

This comment has been minimized.

Copy link
Collaborator

elhigu commented Feb 7, 2019

Also sqlite warning could be moved to happen earlier. Nowadays it is possible to test that error messages are emitted, so test should be added in either way.

@HurSungYun

This comment has been minimized.

Copy link
Contributor Author

HurSungYun commented Feb 11, 2019

I think the warning would be enough. In the case of using the same builder code for both postgreSQL and MySQL, it would be a problem.

And added some tests for it.

@elhigu elhigu merged commit dfe0129 into tgriesser:master Mar 3, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.009%) to 85.098%
Details
@elhigu

This comment has been minimized.

Copy link
Collaborator

elhigu commented Mar 3, 2019

I think this is fine. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.