-
Notifications
You must be signed in to change notification settings - Fork 42
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
Comments
Hi! I like the idea to filter by tables via (multiple) For the file name we need to decide what behavior we want:
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 |
Hey 😄 My 2 cents: I'm fine with the filtering only and with keeping the existing rules around filenames |
Hey guys! I decided to split this issue into two parts:
Please checkout PR #60 and give it a try. The new
I have multiple ideas on this: First, if a file-name is given (rule will be likely *.go file) - then only one
Will produce:
If there is no placeholder but a file-ending given in Another approach would be to support multiple LMK WDYT |
Thanks for taking this up! I really like the approach! |
OMG I was so focused to add the new flag and integrate it into the SQL query that I forgot to actually pass it down 🤦♂️ @blackfyre I added one more commit, please update your local branch, run |
Can confirm, it's working 👍 |
Awesome, glad to hear! I will test with other databases later this week and if everything appears to be good, will merge into master 👍 |
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.
The text was updated successfully, but these errors were encountered: