Skip to content

Variable binding fails if ? appears within a string in query sql. #60

@droundy

Description

@droundy

When I preform a query looking like SELECT * FROM table WHERE field LIKE '%?%' I get a panic like: unbound query argument ? or ?fields. This is bad on multiple levels. Panicking in response to invalid input doesn't seem great, but it's even worse that this panic is for a valid sql query.

It seems that at least some rudimentary tokenizing should be done in order to only respond to ? that are not parts of string literals.

As a kludge we could alternatively have a method that says to ignore any ? that are present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions