Skip to content

"Field should have snake_case name" warnings in query! macro #3078

@Cannedfood

Description

@Cannedfood

Bug Description

If a table uses non-snake_case column names, rust-analyzer will scream at you in the query! macro.

image

It should probably be possible to generate a #[allow(non_snake_case)] somewhere in the macro.

Minimal Reproduction

A small code snippet or a link to a Github repo or Gist, with instructions on reproducing the bug.

Info

  • SQLx version: 0.7.3
  • SQLx features enabled: ["postgres", "runtime-tokio", "time", "tls-native-tls"]
  • Database server and version: Postgres 15.6
  • Operating system: Windows 11
  • rustc --version: rustc 1.78.0-nightly (a84bb95a1 2024-02-13)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions