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

fix: escapeObject parameter order for Postgres dialect. #2003

Merged
merged 2 commits into from Apr 12, 2017

Conversation

@santegoeds
Copy link
Contributor

@santegoeds santegoeds commented Apr 10, 2017

Found this bug when I added support for writing moment instances (which in turn I did to fix timezone issues I had when writing DATE types).

const moment = require('moment')

moment.fn.toPostgres = function () {
  return this.format()
}
@elhigu
Copy link
Member

@elhigu elhigu commented Apr 10, 2017

thanks, this needs a test case too.

@santegoeds
Copy link
Contributor Author

@santegoeds santegoeds commented Apr 10, 2017

Can you suggest a suitable location where I can add a test case?

@santegoeds
Copy link
Contributor Author

@santegoeds santegoeds commented Apr 10, 2017

I found a location for a test @elhigu. Please let me know if you'd like me to squash the commits.

@santegoeds santegoeds closed this Apr 11, 2017
@santegoeds santegoeds reopened this Apr 11, 2017
@elhigu
Copy link
Member

@elhigu elhigu commented Apr 12, 2017

Thanks! Fix looks ok, it hides worst bugs from that part of the code.

I'm pretty sure that actually timezone + seen parameters should be completely removed and replaced with ctx object and then some more changed should be probably done to support seen and timezone parameters as they were intented...

I'm merging this one for now and add an issue about that function...

@elhigu elhigu merged commit 5c0b193 into knex:master Apr 12, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hulbert
Copy link
Contributor

@hulbert hulbert commented Jul 14, 2017

@elhigu is this toPostgres functionality documented anywhere?

@elhigu
Copy link
Member

@elhigu elhigu commented Jul 14, 2017

@hulbert no and it should not be. It is not part of public API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants