Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

Adds MySQL as a supported database driver alongside PostgreSQL and SQLite.

Changes

  • gorm_client/db.go: Added openMysql() function with standard DSN format (charset=utf8mb4&parseTime=True&loc=Local)
  • gorm_client/db.go: Added "mysql" case to NewDB() switch
  • go.mod: Added gorm.io/driver/mysql v1.6.0 dependency
  • gorm_client/db_test.go: Added unit tests for all database drivers
  • gorm_client/example_test.go: Added MySQL usage example
  • README.md: Updated supported drivers list

Usage

db := gorm_client.NewDB(gorm_client.Config{
    Driver:   "mysql",
    Host:     "localhost",
    Port:     3306,
    Username: "user",
    Password: "password",
    Name:     "mydb",
})
Original prompt

This section details on the original issue you should resolve

<issue_title>Support MySQL driver in gorm_client</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits October 29, 2025 04:15
Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
Copilot AI changed the title [WIP] Support MySQL driver in gorm_client Add MySQL driver support to gorm_client Oct 29, 2025
Copilot AI requested a review from slhmy October 29, 2025 04:21
@slhmy slhmy marked this pull request as ready for review October 29, 2025 04:21
@slhmy slhmy merged commit e9bb768 into main Oct 30, 2025
2 checks passed
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.

Support MySQL driver in gorm_client

2 participants