Next: Examples for Usage of
Up: Functions
Previous: Functions
Functions are special queries which have some input parameters
and return exactly one object as result for one set of input parameters.
Similar to builtin-queries, they are implemented by a PROLOG predicate
which is defined either in the OB.builtin file (this file is part of
every ConceptBase application) or in a LPI-file (see also section 5.2.2).
With the following predefined functions, one can make aggregations and
simple arithmetic computations:
- COUNT:
- counts the instances of a class, this may be also a query class
- SUM:
- computes the sum of the instances of a class (must be reals or integers)
- AVG:
- computes the average of the instances of a class (must be reals or integers)
- MAX:
- gives the maximum of the instances of a class (wrt. the order of < and >, see section 2.2)
- MIN:
- gives the minimum of the instances of a class (wrt. the order of < and >, see section 2.2)
- SUM_Attribute:
- computes the sum of the attributes in the specified category of an object (must be reals or integers)
- AVG_Attribute:
- computes the average of the attributes in the specified category of an object (must be reals or integers)
- MAX_Attribute:
- gives the maximum of the attributes in the specified category of an object (wrt. the order of < and >, see section 2.2)
- MIN_Attribute:
- gives the minimum of the attributes in the specified category of an object (wrt. the order of < and >, see section 2.2)
- PLUS:
- computes the sum of two reals or integers
- MINUS:
- computes the difference of two reals or integers
- MULT:
- computes the product of two reals or integers
- DIV:
- computes the quotient of two reals or integers
- ConcatenateStrings:
- concatenates two string objects
Next: Examples for Usage of
Up: Functions
Previous: Functions
ConceptBase Team