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

Add support for per per-query types #1825

Merged
merged 1 commit into from Apr 16, 2019

Conversation

twooster
Copy link
Contributor

The documentation states that you can pass custom type processors to
query objects. See:

https://node-postgres.com/features/queries#types

This didn't actually work. This commit adds an initial implementation
of per-query type-parsing. Caveats:

  • It does not work with pg-native. That would require a separate pull
    request to pg-native, and a rather significant change to how that
    library handles query results.

  • Per-query types do not "inherit" from types assigned to the Client,
    ala TypeOverrides.

@twooster
Copy link
Contributor Author

twooster commented Feb 4, 2019

(test failure appears unrelated?)

@brianc
Copy link
Owner

brianc commented Mar 7, 2019

Hey sorry for the delay! This looks great - would you mind rebasing on master? I fixed the tests.

The documentation states that you can pass custom type processors to
query objects. See:

https://node-postgres.com/features/queries#types

This didn't actually work. This commit adds an initial implementation
of per-query type-parsing. Caveats:

* It does not work with pg-native. That would require a separate pull
  request to pg-native, and a rather significant change to how that
  library handles query results.

* Per-query types do not "inherit" from types assigned to the Client,
  ala TypeOverrides.
@twooster
Copy link
Contributor Author

I rebased. Looks green. :)

@brianc
Copy link
Owner

brianc commented Apr 15, 2019

awesome thanks! Will merge this (and a few others) & do a release tomorrow!

@mitar
Copy link

mitar commented Jul 18, 2020

I think it should be documented somewhere, that types do not inherit?

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

Successfully merging this pull request may close these issues.

None yet

3 participants