mirror of https://github.com/dapr/docs.git
Update doc for CEL match for numeric values (#3128)
* Fix CEL match documentation for numeric values Signed-off-by: Federico Codognotto <fede.codo38@gmail.com> Signed-off-by: Federico Codognotto <fcodognotto@tempestive.com> * Update daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-route-messages.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Federico Codognotto <62144863+federicocodo@users.noreply.github.com> --------- Signed-off-by: Federico Codognotto <fede.codo38@gmail.com> Signed-off-by: Federico Codognotto <fcodognotto@tempestive.com> Signed-off-by: Federico Codognotto <62144863+federicocodo@users.noreply.github.com> Co-authored-by: Federico Codognotto <fcodognotto@tempestive.com> Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
This commit is contained in:
parent
59d36ce91c
commit
75109bf8a1
|
@ -268,8 +268,11 @@ has(event.data.important) && event.data.important == true
|
|||
Match deposits greater than $10,000:
|
||||
|
||||
```javascript
|
||||
event.type == "deposit" && event.data.amount > 10000
|
||||
event.type == "deposit" && int(event.data.amount) > 10000
|
||||
```
|
||||
{{% alert title="Note" color="primary" %}}
|
||||
By default the numeric values are written as double-precision floating-point. There are no automatic arithmetic conversions for numeric values. In this case, if `event.data.amount` is not cast as integer, the match is not performed. For more information, see the [CEL documentation](https://github.com/google/cel-spec/blob/master/doc/langdef.md).
|
||||
{{% /alert %}}
|
||||
|
||||
Match multiple versions of a message:
|
||||
|
||||
|
|
Loading…
Reference in New Issue