DuroDBMS API  1.2
Built-in relational and related operators

OPERATOR RELATION

OPERATOR RELATION(t TUPLE { * }, ...) RETURNS RELATION { * };

Description

The relation selector.


OPERATOR is_empty

OPERATOR is_empty(RELATION { * }) RETURNS boolean;

Description

Checks if a table is empty.

Return value

TRUE if the relation-valued operand is empty, RDB_FALSE otherwise.


OPERATOR count

OPERATOR count(RELATION { * }) RETURNS integer;

Description

Counts the tuples in a table.

Return value

The cardinality of the relation-valued operand.


OPERATOR in

OPERATOR in (t TUPLE { * }, r RELATION { * }) RETURNS boolean;

Description

Checks if a table contains a given tuple.

Return value

TRUE if r contains t, RDB_FALSE otherwise.


OPERATOR subset_of

OPERATOR subset_of(r1 RELATION { * }, r2 RELATION { * }) RETURNS boolean;

Description

Checks if a table is a subset of another table.

Return value

TRUE if the r1 is a subset of r2, RDB_FALSE otherwise.


OPERATOR any

OPERATOR any(r RELATION { * }, attr boolean) RETURNS boolean;

Description

The any aggregate operator. For the semantics, see RDB_any().


OPERATOR all

OPERATOR all(r RELATION { * }, attr boolean) RETURNS boolean;

Description

The all aggregate operator. For the semantics, see RDB_all().


OPERATOR avg

OPERATOR avg(r RELATION { * }, attr integer) RETURNS float;

OPERATOR avg(r RELATION { * }, attr float) RETURNS float;

Description

The avg aggregate operator. For the semantics, see RDB_avg().


OPERATOR max

OPERATOR max(r RELATION { * }, attr integer) RETURNS integer;

OPERATOR max(r RELATION { * }, attr float) RETURNS float;

Description

The max aggregate operator. For the semantics, see RDB_max().


OPERATOR min

OPERATOR min(r RELATION { * }, attr integer) RETURNS integer;

OPERATOR min(r RELATION { * }, attr float) RETURNS float;

Description

The min aggregate operator. For the semantics, see RDB_min().


OPERATOR sum

OPERATOR SUM(r RELATION { * }, attr integer) RETURNS integer;

OPERATOR SUM(r RELATION { * }, attr float) RETURNS float;

Description

The SUM aggregate operator. For the semantics, see RDB_sum().


OPERATOR divide

OPERATOR divide(r1 RELATION { * }, r2 RELATION { * }, r2 RELATION { * }) RETURNS RELATION { * };

Description

The relational three-argument (small) DIVIDE operator.


OPERATOR extend

OPERATOR extend(r RELATION { * }, attrexp ANY, attrname string, ...) RETURNS RELATION { * };


OPERATOR group

OPERATOR group(r RELATION { * }, attrname string ...) RETURNS RELATION { * };


OPERATOR intersect

OPERATOR intersect(r1 RELATION { * }, r2 RELATION { * }) RETURNS RELATION { * };


OPERATOR join

OPERATOR join(r1 RELATION { * }, r2 RELATION { * }) RETURNS RELATION { * };


OPERATOR minus

OPERATOR minus(r1 RELATION { * }, r2 RELATION { * }) RETURNS RELATION { * };


OPERATOR project

OPERATOR project(r1 RELATION { * }, attrname string ...) RETURNS RELATION { * };


OPERATOR remove

OPERATOR remove(r RELATION { * }, attrname string ...) RETURNS RELATION { * };


OPERATOR rename

OPERATOR rename(r RELATION { * }, scr_attrname string, dst_attrname string ...) RETURNS RELATION { * };


OPERATOR ungroup

OPERATOR ungroup(r RELATION { * }, attrname string) RETURNS RELATION { * };


OPERATOR union

OPERATOR union(r1 RELATION { * }, r2 RELATION { * }) RETURNS RELATION { * };


OPERATOR d_union

OPERATOR d_union(r1 RELATION { * }, r2 RELATION { * }) RETURNS RELATION { * };


OPERATOR update

OPERATOR update(r1 RELATION { * }, dst_attrname string, src_expr ANY, ...) RETURNS RELATION { * };


OPERATOR unwrap

OPERATOR unwrap(attrname string, ...) RETURNS RELATION { * };


OPERATOR semijoin

OPERATOR semijoin(r1 RELATION { * }, r2 RELATION { * }) RETURNS RELATION { * };


OPERATOR semiminus

OPERATOR semiminus(r1 RELATION { * }, r2 RELATION { * }) RETURNS RELATION { * };


OPERATOR summarize

OPERATOR summarize(r1 RELATION { * }, r2 RELATION { * }, expr ANY, attrname string, ...) RETURNS RELATION { * };


OPERATOR tclose

OPERATOR tclose(r RELATION { * }) RETURNS RELATION { * };

The transitive closure operator.


OPERATOR where

OPERATOR where(r RELATION { * }, b boolean) RETURNS RELATION { * };

The relational WHERE operator.


OPERATOR wrap

OPERATOR wrap(r RELATION { * }, src_attrs ARRAY OF string, dst_attr string ...) RETURNS RELATION { * };

The relational WRAP operator.