Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add support for nullable json fieds in MySQL.
  • Loading branch information
advait committed Jan 7, 2025
commit c8d85f7298fe1820c2eaad275cd6d3e3c556c43d
5 changes: 4 additions & 1 deletion internal/codegen/golang/mysql_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ func mysqlType(req *plugin.GenerateRequest, options *opts.Options, col *plugin.C
return "sql.NullBool"

case "json":
return "json.RawMessage"
if notNull {
return "json.RawMessage"
}
return "*json.RawMessage"

case "any":
return "interface{}"
Expand Down
Loading