Check if Fields Contain Same Value
Search for more fields with same length
Query
logscale
test(length(userid) == length(method))
Introduction
The test()
function can be used to make
comparisons between one field and one value, and it can also
compare more fields and their respective values.
In this example,
the test()
function is used to search for
events where the userid
field and method field
have the same length.
Step-by-Step
Starting with the source repository events.
- flowchart LR; %%{init: {"flowchart": {"defaultRenderer": "elk"}} }%% repo{{Events}} 0[(Filter Function)] result{{Result Set}} repo --> 0 0 --> result style 0 fill:#ffbf00; style 0 fill:#ff0000,stroke-width:4px,stroke:#000;logscale
test(length(userid) == length(method))
Returns all events where field userid has the same length as the method field. This could for example be events with
Chad
andPOST
, andPeter
andPATCH
. Event Result set.
Summary and Results
The query is used to compare more fields and their respective values.