Skip to content

Commit

Permalink
mysql: interpolate parameters by default
Browse files Browse the repository at this point in the history
This cuts our queries down to 1 round-trip to the database per
operation. When interpolateParams is false (the default) the mysql
driver will call prepare before executing a query.
  • Loading branch information
tdeebswihart committed Feb 16, 2024
1 parent a9e2c09 commit 0d86141
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/persistence/sql/sqlplugin/mysql/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ const (
)

var dsnAttrOverrides = map[string]string{
"parseTime": "true",
"clientFoundRows": "true",
"parseTime": "true",
"clientFoundRows": "true",
"interpolateParams": "true",
}

type Session struct {
Expand Down

0 comments on commit 0d86141

Please # to comment.