Skip to content

Support UNIX socket connections in the MySQL generator - #538

Open
termermc wants to merge 1 commit into
go-jet:masterfrom
termermc:mysql-generator-unix-socket
Open

Support UNIX socket connections in the MySQL generator#538
termermc wants to merge 1 commit into
go-jet:masterfrom
termermc:mysql-generator-unix-socket

Conversation

@termermc

Copy link
Copy Markdown

The Generate function in mysql_generator.go does not support connecting to the server over a local UNIX socket, this PR adds support for that.

@codecov

codecov Bot commented Dec 15, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.15%. Comparing base (adef2f9) to head (a03029a).

Files with missing lines Patch % Lines
generator/mysql/mysql_generator.go 60.00% 3 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (60.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #538      +/-   ##
==========================================
- Coverage   92.19%   92.15%   -0.04%     
==========================================
  Files         139      139              
  Lines        8584     8593       +9     
==========================================
+ Hits         7914     7919       +5     
- Misses        493      496       +3     
- Partials      177      178       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@termermc

Copy link
Copy Markdown
Author

Are any maintainers interested in taking a look at this PR? I just remembered this while going through my email.

@go-jet

go-jet commented Mar 30, 2026

Copy link
Copy Markdown
Owner

Are any maintainers interested in taking a look at this PR? I just remembered this while going through my email.

Can this be achieved using -dsn or GenerateDSN? If so, I'd rather not extend DBConnection further.

@termermc

Copy link
Copy Markdown
Author

Are any maintainers interested in taking a look at this PR? I just remembered this while going through my email.

Can this be achieved using -dsn or GenerateDSN? If so, I'd rather not extend DBConnection further.

After a cursory look, it seems like GenerateDSN does support UNIX connections.

Perhaps documentation in the wiki could be updated to explain how to make a UNIX connection with GenerateDSN?

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

Successfully merging this pull request may close these issues.

2 participants