Module glc_ops

Built in operators.

Description

Built in operators.

Data Types

op()

op() = {atom(), '<', term()} | {atom(), '=<', term()} | {atom(), '=', term()} | {atom(), '!=', term()} | {atom(), '>', term()} | {atom(), '>=', term()} | {atom(), '*'} | {atom(), '!'} | {any, [op(), ...]} | {all, [op(), ...]} | {null, true | false}

Function Index

all/1Filter the input using multiple filters.
any/1Filter the input using one of multiple filters.
eq/2Test that a field value is equal to a term.
gt/2Test that a field value is greater than a term.
gte/2Test that a field value is greater than or equal to a term.
lt/2Test that a field value is less than a term.
lte/2Test that a field value is less than or equal to a term.
neq/2Test that a field value is not equal to a term.
nf/1Test that a field is not found.
null/1Always return true or false.
union/1Return a union of multiple queries.
wc/1Test that a field exists.
with/2Apply a function to each output of a query.

Function Details

all/1

all(Conds::[op()]) -> op()

Filter the input using multiple filters.

For an input to be considered valid output the all filters specified in the list must hold for the input event. The list is expected to be a non-empty list. If the list of filters is an empty list a badarg error will be thrown.

any/1

any(Conds::[op()]) -> op()

Filter the input using one of multiple filters.

For an input to be considered valid output on of the filters specified in the list must hold for the input event. The list is expected to be a non-empty list. If the list of filters is an empty list a badarg error will be thrown.

eq/2

eq(Key::atom(), Term::term()) -> op()

Test that a field value is equal to a term.

gt/2

gt(Key::atom(), Term::term()) -> op()

Test that a field value is greater than a term.

gte/2

gte(Key::atom(), Term::term()) -> op()

Test that a field value is greater than or equal to a term.

lt/2

lt(Key::atom(), Term::term()) -> op()

Test that a field value is less than a term.

lte/2

lte(Key::atom(), Term::term()) -> op()

Test that a field value is less than or equal to a term.

neq/2

neq(Key::atom(), Term::term()) -> op()

Test that a field value is not equal to a term.

nf/1

nf(Key::atom()) -> op()

Test that a field is not found.

null/1

null(Result::boolean()) -> op()

Always return true or false.

union/1

union(Queries::[op()]) -> op()

Return a union of multiple queries.

The union of multiple queries is the equivalent of executing multiple queries separately on the same input event. The advantage is that filter conditions that are common to all or some of the queries only need to be tested once.

All queries are expected to be valid and have an output action other than the default which is output. If these expectations don't hold a badarg error will be thrown.

wc/1

wc(Key::atom()) -> op()

Test that a field exists.

with/2

with(Query::op(), Fun::fun((gre:event()) -> term())) -> op()

Apply a function to each output of a query.

Updating the output action of a query finalizes it. Attempting to use a finalized query to construct a new query will result in a badarg error.


Generated by EDoc, May 28 2018, 15:25:56.