littlebits / stream-sift

A minimal high-performance specification-backed stateful object matching engine
MIT License
1 stars 1 forks source link

Validate that the spec is possible to satisfy #14

Open jasonkuhrt opened 9 years ago

jasonkuhrt commented 9 years ago

For example:

{ input: { $gte: 5, $lte: 3 } }
Errors:

(1) Impossible Spec: The given spec is impossible to satisfy. Key "input" can never be "gte" to "5" AND "lte" to "3".

{
  input: {
    $gte: 5,
     ^^^ (1)
    $lte: 3
     ^^^ (1)
  }
}

Solutions:

(1) <Suggestion about how to fix the impossibility>