Skip to content

invalid ORDER BY clause generated if used with a function call with commas in it #304

@sys-64738

Description

@sys-64738

As noted in #155 , the adapter fails to create a correct ORDER BY clause if the order criteria is an expression that contains commas. 53a248a includes a code comment # Allow functions with comma(s) to pass thru. which suggests that this is working, but it is not. The code of the order method initially splits the input string by commas, then adds ASC to each array element (i.e. ORDER BY FOO(1,2,3) becomes ORDER BY FOO(1 ASC, 2 ASC, 3) ASC.

To fix this, the code would have to match opening and closing brackets in order to catch only commas outside the outer brackets of the expression.

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