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.
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 singlenkeyword argument bound at both positions.Bundled mode (
query_parameter_limitexceeded, or:copyfromif MySQL ever gets one) does not: the Params class getsnandn_2fields 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 (mirroringQueryValue.Repeated) and skipping them in the class fields while keeping their binding slots inexpandParams.