Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SqlFunctionExpression for to_char inverts the arguments in the generated sql if the function name is uppercased #384

Closed
Labels
Milestone
@iulianb

Description

I'm implementing a custom db expression and I've noticed the issue mentioned in the title. I've worked out the source of the issue in the OracleQuerySqlGenerator class of the Oracle.EntityFrameworkCore.Query.Sql.Internal namespace, the function that handles the translation of the TO_CHAR function inverts the indexes of the arguments. Not sure if it's intentional, although I can't understand why it would be.

new SqlFunctionExpression(
 // if this is uppercased then its arguments are inverted in the generated sql, it works fine when 
 // lowercased because the translation code tests for equality on the uppercased version
 "to_char", 
 new SqlExpression[]
 {
 // ...
 },
 nullable: false,
 argumentsPropagateNullability: new[] { false, false },
 type: args[0].Type,
 typeMapping: args[0].TypeMapping)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /