You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Merge reused MySQL named arguments in bundled Params classes #250
sqlc's MySQL engine emits one parameter per occurrence of a reused named argument. Since #248, plain mode merges them - WHERE name = sqlc.arg(n) OR alias = sqlc.arg(n) generates a single n keyword argument bound at both positions.
Bundled mode (query_parameter_limit exceeded, or :copyfrom if MySQL ever gets one) does not: the Params class gets n and n_2 fields the caller must fill with the same value. The generated code binds them positionally correctly, so this is an API wart rather than a bug, and the combination is rare. Fixing it means marking repeated columns on the bundled class (mirroring QueryValue.Repeated) and skipping them in the class fields while keeping their binding slots in expandParams.
Fixed in #248: bundledParams now merges reused named arguments the same way plainParams does, with the repeated occurrences keeping their binding slots.
Activity
rayakame commentedon Aug 15, 2026
Fixed in #248: bundledParams now merges reused named arguments the same way plainParams does, with the repeated occurrences keeping their binding slots.
fix: merge reused named arguments in bundled Params classes too
feat: MySQL support via the pymysql and asyncmy drivers (#248)