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

Specify table(s) and generated filename #56

Open
guhkun13 opened this issue Sep 2, 2023 · 1 comment
Open

Specify table(s) and generated filename #56

guhkun13 opened this issue Sep 2, 2023 · 1 comment

Comments

@guhkun13
Copy link

guhkun13 commented Sep 2, 2023

Hi, thanks for great repo.

I wonder if it is possible if we can specify which table(s) that we'll be convert into struct.
maybe using flag table ?
and also option to define the generated filename, such as model.go

example 1: tables-to-go -d booking_app -table invoice -of /internal/domain/invoice -o model
--> will create file /internal/domain/invoice/model.go

example 2: tables-to-go -d booking_app -table order -of /internal/domain/order -o model
--> will create file /internal/domain/order/model.go

I think this would allow us to be more selective on generating the struct and saving it into each domain folder with specified filename.

@guhkun13 guhkun13 changed the title Specify single/multiple table Specify table(s) and generated filename Sep 2, 2023
@fraenky8
Copy link
Owner

fraenky8 commented Sep 4, 2023

Hi!

I like the idea to filter by tables via (multiple) -table flags 👍

For the file name we need to decide what behavior we want:

  1. If multiple tables are specified then also multiple file-names (in same order) needs to be specified?
  2. Or we restrict the usage of only one -table flag and one -o flag at the same time?
  3. ???

Tbh I would like to keep the scope of the tool small, don't make it more complex as it is already. We can start on the -table flag first before moving on to the file-name output? Because I think these are 2 different new features.

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

No branches or pull requests

2 participants