Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alter sqlx.BindNamed to implicitly use question (breaking change)
To get the old behavior, code must now rebind to the desired bindvar. For example, if you want sqlx.DOLLAR bindvars, before your code was: sqlx.BindNamed(sqlx.DOLLAR, "query..", myarg) Your new code will be: query, args, err := sqlx.BindNamed("query...", myarg) sqlx.Rebind(sqlx.DOLLAR, query) This causes a secondary binding for non-QUESTION using databases, but this is considered to be less important because: * consistently using QUESTION internally makes sqlx.In and sqlx.BindNamed composable * this function is not widely used and db.BindNamed/tx.BindNamed can use the internal APIs to skip the double binding * bindvar types are sort of 95% an internal concept
- Loading branch information