Skip to content

Filtering replacement #1287

Closed as not planned
Closed as not planned
@bkoelman

Description

@bkoelman

My end goal was to provide my front-end team with the following:

  • An easier / more-readable sql-ish filter expression language
  • Access to advanced features like full text search or regex search
  • Access to more functions available through EFCore such as date, numeric and string functions
  • Access to arithmetic functions through standard symbols like +, -, *, /
  • Filter parameterization eg: filter=name like $nameMatch&filter[$nameMatch]=%example%

I've got an Antlr4 grammar & parser generated for this language. In a perfect world I'd like to submit a PR for this either in the core or as a separate package. I'm struggling to identify exactly what I'd need to that as I find the current model confusing / cumbersome. Specifically I'm running into trouble:

  • Having to reflect every possible type of expression as a function on QueryExpressionVisitor.
  • Keeping the various layers separate in my head as I find the names of the various trees indistinct

It would be nice if:

  • The JsonApiDotNetCore.Queries.Expressions.QueryExpression.Visit could be purely representational / not have the Visit function.
  • Logic for converting QueryExpressions to System.Linq.Expressions could be encapsulated separately

Originally posted by @jeffreyabecker in #1277 (comment)

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