littlebits / stream-sift

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

Validate that functions used align with the schema of the underlying key-value #18

Open jasonkuhrt opened 9 years ago

jasonkuhrt commented 9 years ago

For example:

{ from: { $gte: 5 } }
Errors:

(1) Schema Error: The function "$gte" only works on keys with values of type "String" or "Number" but was used on key "from" which has incompatible type of value of "Map".

{
  from: {            
    $gte: 5
     ^^^ (1)
  }
}

Solutions:

(1) <BlahBlah schema info and $gte docs>