Open koalazub opened 8 months ago
I am also having this issue. I was hoping to pass a struct to NamedExec() and use @p1, @p2, @p... placeholders however this gives me the same error, Must declare the scalar variable @p1
I am also having this issue. I was hoping to pass a struct to NamedExec() and use @p1, @p2, @p... placeholders however this gives me the same error,
Must declare the scalar variable @p1
Yeah I couldn't figure out a solution for it and just typed each field out unfortunately. Wasn't fun considering the size of the thing
Tools: |-----| | go 1.21 | | github.com/gorilla/schema v1.2.1 | | github.com/jmoiron/sqlx v1.3.5 |
I'm currently getting an error when using named parameters for my Azure SQL Database.
Contrived, but when performing the following:
I get an error:
Yet when I do:
It correctly updates the table.
I had the expectation that it removed the need to explicitly state each named parameter but that doesn't seem to be the case in this context. I am pretty new to sqlx, so I'm not sure if I'm missing something here. I did see that there were some fixes to named params in #406 for SQL Server