Skip to content

Add support for per per-query types#1825

Merged
brianc merged 1 commit intobrianc:masterfrom
twooster:add-per-query-type-parsers
Apr 16, 2019
Merged

Add support for per per-query types#1825
brianc merged 1 commit intobrianc:masterfrom
twooster:add-per-query-type-parsers

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 twooster force-pushed the add-per-query-type-parsers branch from 53fe780 to e585975 Compare March 7, 2019 17:05
@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

3 participants