-
-
Notifications
You must be signed in to change notification settings - Fork 471
Adding sqlc advanced option #401
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
base: blueprint_ui
Are you sure you want to change the base?
Conversation
…t allowing for a forced shutdown during graceful shutdown.
As the @tailwindcss/vite is installed and only supports v4 we are using --prefer-offline flag that can install tailwindcss v3 from cache with this we force to use cache only is tailwindcss version is greater than v4
| name: Install Sqlc & gen code | ||
| run: | | ||
| go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest | ||
| /home/runner/go/bin/sqlc generate -f ${{ env.PROJECT_DIRECTORY }}/sqlc.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this lead to breaking changes if the go bin is not in /hom/runne/go/bin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well this is the same way templ is installed, and unless the name of the runner user changes (which is highly unlikely) it should work fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use $(go env GOPATH)/bin/sqlc instead of /home/runner/go/bin/sqlc
| } | ||
|
|
||
| steps := steps.InitSteps(flagFramework, flagDBDriver) | ||
| optionSteps := steps.InitSteps(flagFramework, flagDBDriver) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the rename here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I needed to use the 'steps' package later
cmd/create.go
Outdated
| if project.DBDriver != flags.Postgres && project.DBDriver != flags.MySql && project.DBDriver != flags.Sqlite { | ||
| step.Options = slices.DeleteFunc(step.Options, func(s steps.Item) bool { return s.Flag == "Sqlc" }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a cleaner way to do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idk this is the most seamless solution I could come up with for the UX. Although I agree the code is a bit jank, have any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a cleaner solution
supportedDrivers := []flags.Database{flags.Postgres, flags.MySql, flags.Sqlite}
if !slices.Contains(supportedDrivers, project.DBDriver) {
step.Options = slices.DeleteFunc(step.Options, func(s steps.Item) bool {
return s.Flag == "Sqlc"
})
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks I'll add that right now
Co-authored-by: Ujstor <116409846+Ujstor@users.noreply.github.com>
* adding workflow and script to support npm distribution * refactor npm workflow * fixing workflow for npm publisher * improve npm authentication in workflow * updating docs for installation
|
@Melkeydev Just checking in, but are you able to merge this PR now after it addressed the feedback? |
|
@StevenACoffman @Melkeydev There’s still some documentation that needs to be updated with the recent changes. I’ve already opened a PR to the sqlc branch of @eggplannt with those updates, but it hasn’t been merged yet. |
Update sqlc branch with latest main and add documentation
|
Are there any updates on this pull request? |
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
Problem/Feature
Please include a description of the problem or feature this PR is addressing.
Description of Changes:
Querytodatabase.servicefor relevant driverscloses #400
Checklist