Skip to content

Inconsistent backend UUID values in method get_db_prep_value() #49

@lingxiaoyang

Description

@lingxiaoyang

Besides #46, another issue with method get_db_prep_value is inconsistency of hyphens.

Let's say we pass the value as a UUID object UUID('00010203-0405-0607-0809-0a0b0c0d0e0f'). The method returns str(value), which, according to Python doc, is stringified with hyphen '00010203-0405-0607-0809-0a0b0c0d0e0f'. However, if we pass a string '00010203-0405-0607-0809-0a0b0c0d0e0f', the method will return a non-hyphen version of it. It doesn't matter with PostgreSQL which supports UUID type, but for other backends where UUID is stored as a char32 the inconsistency would be a problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions