Skip to content

Conversation

kevinburke
Copy link

database/sql defaults to using the QueryContext and ExecContext API's.
Previously, we would need to allocate in order to convert the driver.NamedValue
parameter that each of those accepts to a driver.Value. By using
driver.NamedValue consistently internally, we can save allocations and improve
performance.

See #1067 for a full set of benchmarks.

….Value

database/sql defaults to using the QueryContext and ExecContext API's.
Previously, we would need to allocate in order to convert the driver.NamedValue
parameter that each of those accepts to a driver.Value. By using
driver.NamedValue consistently internally, we can save allocations and improve
performance.

See lib#1067 for a full set of benchmarks.
@kevinburke kevinburke changed the title all: switch internal API's to use driver.NamedValue instead of driver.NamedValue all: switch internal API's to use driver.NamedValue instead of driver.Value Jan 26, 2022
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.

1 participant