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

Added error if chaining update/insert/etc with first() #2506

Merged
merged 1 commit into from Feb 22, 2018

Conversation

Projects
None yet
2 participants
@wubzz
Copy link
Collaborator

wubzz commented Feb 22, 2018

Fixes #2061

This throws error in for example

knex(table)
.update({column: value})
.first();

But does not throw for

knex(table)
.first()
.update({column: value});

Since the latter correctly generates an update query.

@elhigu

elhigu approved these changes Feb 22, 2018

Copy link
Collaborator

elhigu left a comment

It sounds kind of wrong that the latter one is not throwing an error even that .update() removes LIMIT 1 from the query.

Anyways I'm ok with this.

@wubzz wubzz merged commit ad1062b into tgriesser:master Feb 22, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
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.