condition priority

  • 3
  • Idea
  • Updated 4 years ago
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 4 years ago

  • 3
Photo of Andrew Duensing

Andrew Duensing, Employee

  • 740 Points 500 badge 2x thumb
Pat, you're going to have to bear with me here. I watched your video like 8 times and I'm still not entirely sure what you're suggesting. 

I understand that you want some conditions to be ignored if others are true, but what I'm not quite sure about is how Skuid is incapable of doing this in a declarative manner already by applying grouping logic. If you do something like "(1 AND 2) OR (3 AND 4)", if "1 AND 2" evaluates to true, Skuid wont even bother checking the "3 AND 4" since the statement would resolve to true regardless of the outcome. Could you maybe give me some more information?
Photo of Oliver Sinfield

Oliver Sinfield

  • 922 Points 500 badge 2x thumb
So, the idea being you could add weighting/ordering to condition "groups", which would be queried against serially until a result is found.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
I think the basic question is this: Does the query logic iterate over conditions first, or records first?

Does it look at the first record against all of the conditions, then move to the next record,

Or does it look at all of the records against the first condition, and then move to the next condition?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
I think the basic question is this: Does the query logic iterate over conditions first, or records first?

Does it look at the first record against all of the conditions, then move to the next record,

Or does it look at all of the records against the first condition, and then move to the next condition?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
I'd bet that it  looks at the first record against all of the conditions, then move to the next record.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Yeah, Pat. That's what I would expect, too. But from Andrew and Ben's video, it seems they expect the other.