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

Raw query resolution syntax change #297

Closed
ericeslinger opened this Issue Jun 4, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@ericeslinger
Contributor

ericeslinger commented Jun 4, 2014

It used to be that Knex.raw('query').then(function(results){}) would have results resolve as an object with a rows attribute. So if I do a complex SQL query and want to return the results, I'd do Helper.runQuery().then(function(results){res.send(results.rows)}).

Now I just send results, which is a breaking change (to be expected moving to the 0.6 version), but it's definitely worth noting if this was intended.

I don't know if this is a change in pg or knex.

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Jun 4, 2014

Oh, I see. Let me fix that...

@tgriesser tgriesser closed this in 4da1975 Jun 4, 2014

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Jun 4, 2014

Yeah the idea is that raw will give you whatever you would have gotten had you called the underlying driver, so this was an unintended change. Thanks for pointing it out - fixed in 0.6.2

@tgriesser tgriesser added bug labels Jun 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment