Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Editor with OR condition

Anonymous
2013-04-12
2013-07-02

  • Anonymous
    2013-04-12

    Hi,

    I'm using Editor. How can I create a condition with OR?

    Thanks

     
  • Jakub Vrána
    Jakub Vrána
    2013-04-13

    You would need a plugin for it. If you could design how it should look like then I'm willing to implement it.

     
  • avimar
    avimar
    2013-07-01

    This would be awesome.. when I get to an OR I have to click edit and do the rest manually.

    Lemme see, maybe I can figure out how a UI would look.

     
  • avimar
    avimar
    2013-07-01

    In mysql: a AND b AND c OR d --> will match just D.
    So that means we need groupings. Perhaps an indented group of ORs where only one of them needs to match? It won't satisfy really complicated cases of (a AND B) or C or D.

    Oh. Groupings. So I have an idea of 1-depth groupings.
    Add a plus button to create a new grouping. Then set that entire grouping (which is inside () in the SQL) as either an AND to the first one, or an OR. Within each grouping it's always AND.

    Except, this way doesn't let you specify a "core" group that must be satisfied, then a group that's one OR the other. I'll attach my gui build, but it won't really work.
    E.g. what I wanted was to pick usa OR uk. Perhaps we need another drop down next to each item, to choose AND/OR? That makes things much messier than they already are...
    Maybe someone has a better idea. This is surely non-trivial. I couldn't find any screenshots of something that did this.

     
    Attachments
  • Jakub Vrána
    Jakub Vrána
    2013-07-02

    This is too complicated. You can easily search for 'uk', 'usa' with IN.