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
when using QueryBuilder to perform dynamic SQL binding, the corresponding parameter placeholders are generated incorrectly
通过 QueryBuilder 进行动态 sql 绑定时,生成对应的参数占位符不正确
let id = 100;letmut builder = QueryBuilder::<Mssql>::new("SELECT * FROM table ");
builder.push("WHERE id=").push_bind(id).push(" AND name=").push_bind("test");let sql = builder.build().sql();println!("生成的sql:{}", sql);
-------
生成的sql:SELECT*FROM table WHERE id=? AND name=?
correct result (正确结果应该为):SELECT * FROM table WHERE id=@p1 AND name=@p2
Info
SQLx version: 0.6.38
SQLx features enabled: mssql、runtime-tokio-native-tls
Database server and version: Mssql 2022
Operating system: windows 10
rustc --version: 1.83.0
The text was updated successfully, but these errors were encountered:
moom-en
changed the title
Parameters bound using QueryBuilder, in mssql or for ? Cause error
SQLx-oldapi Parameters bound using QueryBuilder, in mssql or for ? Cause error
Jan 6, 2025
moom-en
changed the title
SQLx-oldapi Parameters bound using QueryBuilder, in mssql or for ? Cause error
Parameters bound using QueryBuilder, in mssql or for ? Cause error
Jan 6, 2025
Bug Description
when using QueryBuilder to perform dynamic SQL binding, the corresponding parameter placeholders are generated incorrectly
通过 QueryBuilder 进行动态 sql 绑定时,生成对应的参数占位符不正确
correct result (正确结果应该为):SELECT * FROM table WHERE id=@p1 AND name=@p2
Info
rustc --version
: 1.83.0The text was updated successfully, but these errors were encountered: