Skip to content

Raw identifier prefixes should be ignored #382

@Pyroglyph

Description

@Pyroglyph

Words like "type" are keywords in Rust, but they are also common field names. Rust allows you to use a keyword as a field identifier if it begins with r#.

Docs example

Tiberius currently treats the prefix as part of the field name, causing errors when using FromRow:

Error: Conversion("Could not find column with index r#type")

When r# is encountered at the beginning of an identifier name, it should be ignored so that db fields with Rust keywords as their names can be mapped onto structs correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions