Skip to content

Trying to pass a regular expression parameter, dollar sign is doubled #47

@rad-pat

Description

@rad-pat

Trying to do similar to:

sqlalchemy.select(sqlalchemy.func.regexp_like(col, '^[0-9]*$'))

The dollar sign is doubled in the generated SQL because of this line

item.replace("\\", "\\\\").replace("'", "\\'").replace("$", "$$").replace("%", "%%")

@hantmac, any idea about the reason for this replacement?

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