Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4186

Refactor AstSetWindowFieldsWindowExpressions into multiple subclasses

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • 2.16.0
    • Affects Version/s: None
    • Component/s: LINQ3
    • Labels:
      None

      Right now the single AstSetWindowFieldsWindowExpression class represents all possible SetWindowFields accumulators.

      It does this by using an operator and a variable number of arguments.

      But this can be error prone because the caller of the constructor needs to make sure to pass the arguments in the right order, with no parameter names to provide clues.

      It also makes the Render methods overly complicated, because the variable number of arguments are rendered differently depending on the operator.

      It would probably be helpful to have a class hierarchy instead of a single class for the SetWindowField accumulators.

       

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: