Skip to content

The Chinese query encoding issue in the function ConvertToGormConditions of the file query_condition.go in sgorm/query/ #101

Open
@SamQK

Description

@SamQK

When I made a query request to the Go backend built with sponge for the value, I encountered a problem where Chinese characters would cause encoding errors and result in query failure. I roughly identified the issue to be in the code segment "str += column.Name + column.Exp + symbol", where symbol is the SQL value expression obtained through column.convert() (instead of the ? placeholder). It is recommended to use parameterized writing.

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