MobilityDB 1.1

◆ set_make_exp()

Set * set_make_exp ( const Datum values,
int  count,
int  maxcount,
meosType  basetype,
bool  ordered 
)

Construct a set from an array of values.

The memory structure depends on whether the value is passed by value or by reference. For example, the memory structure of a set with 2 values passed by value and passed by reference are, respectively, as follows

------------------------------------------------------------
Header | count | bboxsize | ( bbox )_X | Value_0 | Value_1 |
------------------------------------------------------------
---------------------------------------------------------------------
| Header | count | bboxsize | ( bbox )_X | offset_0 | offset_1 | ...
---------------------------------------------------------------------
--------------------------
... | Value_0 | Value_1 |
--------------------------

where

  • Header contains internal information (size, type identifiers, flags)
  • count is the number of values
  • bboxsize is the size of the bounding box
  • bbox is the bounding box and X are unused bytes added for double padding.
  • offset_i are offsets from the begining of the struct for the values
Parameters
[in]valuesArray of values
[in]countNumber of elements in the array
[in]maxcountMaximum number of elements in the array
[in]basetypeBase type
[in]orderedTrue for ordered sets
SQL Function:
intset(), bigintset(), floatset(), textset(), tstzset()
PyMEOS Function:
TstzSet()