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
query_as! macro does not work with rename_all = "camelCase"
Minimal Reproduction
#[derive(Debug, FromRow, Clone)]
#[sqlx(rename_all = "camelCase")]
struct Model {
pub some_name: String;
}
// CREATE TABLE ModelTable ( someName TEXT NOT NULL );
sqlx::query_as!(Model, "SELECT * FROM ModelTable").fetch_all(&pool);
// Error: struct `Model` has no field named `someName`
// help: a field with a similar name exists: `some_name`
While the error message is technically correct, just using query_as without the macro works fine as expected.
Info
SQLx version: 0.6.3
SQLx features enabled: runtime-tokio-rustls, sqlite
Bug Description
query_as! macro does not work with rename_all = "camelCase"
Minimal Reproduction
While the error message is technically correct, just using query_as without the macro works fine as expected.
Info
rustc --version
: rustc 1.72.0-nightly (46514218f 2023-06-20)The text was updated successfully, but these errors were encountered: