Skip to content

Singular Table Name Ending with "s" #430

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

Closed
cstoltze opened this issue Apr 3, 2020 · 1 comment · Fixed by #435
Closed

Singular Table Name Ending with "s" #430

cstoltze opened this issue Apr 3, 2020 · 1 comment · Fixed by #435
Labels
bug Something isn't working

Comments

@cstoltze
Copy link

cstoltze commented Apr 3, 2020

With the following schema:

CREATE TABLE public.campus (
    id integer NOT NULL
);

Running gqlgen produces

type Campu struct {
	ID             int32          `json:"id"`
}

I would prefer to have the struct keep the "s" at the end of campus.

I also tried to use the rename configuration option in my sqlc.yaml file but the "s" is still stripped.

rename:
  campus: Campus

Is there a supported way to force the struct name to be "Campus"?

@kyleconroy kyleconroy added the bug Something isn't working label Apr 5, 2020
@cstoltze
Copy link
Author

cstoltze commented Apr 8, 2020

Thank you for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants