Skip to content

DefaultQuerySqlGenerator not flexible enough for provider override #9143

@roji

Description

@roji

As part of #9126, I set about adding a PostgreSQL-specific ILikeExpression and modifying NpgsqlQuerySqlGenerator to render it correctly. I hit several limitations with DefaultQuerySqlGenerator not exposing enough functionality to subclasses:

  • _typeMapping is private, and so I can't set it properly (as VisitLike() does)
  • isSearchCondition is a private static method, so there's no way to introduce a new expression type that is identified as a search condition. This means that a useless = TRUE is rendered out, and may have other consequences I'm not aware of as well.

I can submit PRs for these two specific problems, but I've run into similar issues previously, so you guys may want to do a proper review of DefaultQuerySqlGenerator keeping providers in mind.

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