Skip to content

Conversation

haines
Copy link
Contributor

@haines haines commented Oct 6, 2022

Fixes #606
Fixes #1752
Fixes #1864

Column type overriding fails when columns are aliased or parameter names do not match the underlying column.

This PR makes the compiler preserve the original column name if a column is aliased in a query or if a named parameter is used instead of a numbered one, and uses that name (if present) to check for a matching type override in the config.

@haines haines force-pushed the override-column-types branch from 09bf173 to 5a3e0c2 Compare October 14, 2022 08:58
@haines haines force-pushed the override-column-types branch 2 times, most recently from 1d419ec to 32556c0 Compare October 25, 2022 14:17
@haines haines force-pushed the override-column-types branch from 32556c0 to d6cbd2c Compare November 10, 2022 15:59
@haines haines force-pushed the override-column-types branch from d6cbd2c to 2ff3b63 Compare November 30, 2022 13:19
@haines haines force-pushed the override-column-types branch from 2ff3b63 to 1004300 Compare February 2, 2023 12:26
@haines haines force-pushed the override-column-types branch from 1004300 to f3405f5 Compare February 14, 2023 12:20
@StevenACoffman
Copy link
Contributor

@haines Thanks for keeping this fresh! @kyleconroy We are using this patch and it is working well for us!

@haines haines force-pushed the override-column-types branch from f3405f5 to 7b3861e Compare February 23, 2023 12:53
@haines
Copy link
Contributor Author

haines commented Feb 23, 2023

@kyleconroy could you please take a look?

Signed-off-by: Andrew Haines <andrew@haines.org.nz>
@haines haines force-pushed the override-column-types branch from 67293b7 to fe18361 Compare June 6, 2023 14:35
@kyleconroy kyleconroy merged commit 99ecfff into sqlc-dev:main Jun 7, 2023
@haines haines deleted the override-column-types branch June 8, 2023 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants