![]() |
MobilityDB 1.3
|
General functions for set values composed of an ordered list of distinct values. More...
#include "temporal/set.h"
#include <assert.h>
#include <float.h>
#include <limits.h>
#include <postgres.h>
#include <utils/timestamp.h>
#include <liblwgeom.h>
#include <meos.h>
#include <meos_internal.h>
#include <meos_internal_geo.h>
#include "temporal/span.h"
#include "temporal/ttext_funcs.h"
#include "temporal/type_parser.h"
#include "temporal/type_util.h"
#include "geo/tgeo_spatialfuncs.h"
#include "geo/tspatial_boxops.h"
Functions | |
Set * | dateset_to_tstzset (const Set *s) |
Convert a date set into a timestamptz set. More... | |
bool | ensure_set_isof_type (const Set *s, meosType settype) |
Ensure that a set is of a given set type. More... | |
bool | ensure_valid_set_set (const Set *s1, const Set *s2) |
Ensure that a temporal number and a temporal box have the same span type. More... | |
Set * | floatset_ceil (const Set *s) |
Return a float set rounded up to the nearest integer @csqlfn Floatset_ceil() More... | |
Set * | floatset_degrees (const Set *s, bool normalize) |
Convert a float set with the values into degrees. More... | |
Set * | floatset_floor (const Set *s) |
Return a float set rounded down to the nearest integer @csqlfn Floatset_floor() More... | |
Set * | floatset_func (const Set *s, Datum(*func)(Datum)) |
Return a float set obtained by applying a function to each element. More... | |
Set * | floatset_radians (const Set *s) |
Convert a float set with the values into radians. More... | |
Set * | floatset_to_intset (const Set *s) |
Convert a float set into an integer set. More... | |
Set * | intset_to_floatset (const Set *s) |
Convert an integer set into a float set. More... | |
Set * | numset_shift_scale (const Set *s, Datum shift, Datum width, bool hasshift, bool haswidth) |
Return a number set shifted and/or scaled by two values. More... | |
static bool | set_basetype_quotes (meosType type) |
Return true if the base type value is output enclosed into quotes. More... | |
static size_t | set_bbox_size (meosType settype) |
Return the size of a bounding box of a temporal type. More... | |
int | set_cmp (const Set *s1, const Set *s2) |
Return -1, 0, or 1 depending on whether the first set is less than, equal, or greater than the second one. More... | |
Set * | set_compact (const Set *s) |
Return a copy of a set ordered, without duplicates, and without any additional free space. More... | |
Set * | set_copy (const Set *s) |
Return a copy of a set. More... | |
Datum | set_end_value (const Set *s) |
Return a copy of the end value of a set. More... | |
bool | set_eq (const Set *s1, const Set *s2) |
Return true if the two sets are equal. More... | |
bool | set_find_value (const Set *s, Datum d, int *loc) |
Return the location of a value in a set using binary search. More... | |
bool | set_ge (const Set *s1, const Set *s2) |
Return true if the first set is greater than or equal to the second one. More... | |
bool | set_gt (const Set *s1, const Set *s2) |
Return true if the first set is greater than the second one. More... | |
uint32 | set_hash (const Set *s) |
Return the 32-bit hash of a set. More... | |
uint64 | set_hash_extended (const Set *s, uint64 seed) |
Return the 64-bit hash of a set using a seed. More... | |
Set * | set_in (const char *str, meosType settype) |
Return a set from its Well-Known Text (WKT) representation. More... | |
bool | set_le (const Set *s1, const Set *s2) |
Return true if the first set is less than or equal to the second one. More... | |
bool | set_lt (const Set *s1, const Set *s2) |
Return true if the first set is less than the second one. More... | |
Set * | set_make (const Datum *values, int count, meosType basetype, bool order) |
Return a set from an array of values. More... | |
Set * | set_make_exp (const Datum *values, int count, int maxcount, meosType basetype, bool order) |
Return a set from an array of values enabling the data structure to expand. More... | |
Set * | set_make_free (Datum *values, int count, meosType basetype, bool order) |
Return a set from the array of values and free the input array after the creation. More... | |
int | set_mem_size (const Set *s) |
Return the size in bytes of a set. More... | |
bool | set_ne (const Set *s1, const Set *s2) |
Return true if the first set is not equal to the second one. More... | |
int | set_num_values (const Set *s) |
Return the number of values of a set. More... | |
char * | set_out (const Set *s, int maxdd) |
Return the Well-Known Text (WKT) representation of a set. More... | |
char * | set_out_fn (const Set *s, int maxdd, outfunc value_out) |
Return the output representation of a set given by a function. More... | |
Set * | set_round (const Set *s, int maxdd) |
Return a set with the precision of the values set to a number of decimal places. More... | |
Datum | set_start_value (const Set *s) |
Return a copy of the start value of a set. More... | |
SetUnnestState * | set_unnest_state_make (const Set *set) |
Create the initial state that persists across multiple calls of the function. More... | |
void | set_unnest_state_next (SetUnnestState *state) |
Increment the current state to the next unnest value. More... | |
Datum * | set_vals (const Set *s) |
Return the array of (pointers to the) values of a set. More... | |
bool | set_value_n (const Set *s, int n, Datum *result) |
Return in the last argument a copy of the n-th value of a set. More... | |
Datum * | set_values (const Set *s) |
Return the array of (copies of) values of a set. More... | |
Set * | textcat_textset_text_int (const Set *s, const text *txt, bool invert) |
Return the concatenation of a text set and a set (internal function) More... | |
Set * | textset_func (const Set *s, Datum(*func)(Datum)) |
Return a float set obtained by applying a function to each element. More... | |
Set * | textset_initcap (const Set *s) |
Return a text set transformed to initcap. More... | |
Set * | textset_lower (const Set *s) |
Return a text set transformed to lowercase. More... | |
Set * | textset_upper (const Set *s) |
Return a text set transformed to uppercase. More... | |
Set * | tstzset_shift_scale (const Set *s, const Interval *shift, const Interval *duration) |
Return a timestamptz set shifted and/or scaled by two intervals. More... | |
Set * | tstzset_to_dateset (const Set *s) |
Convert a timestamptz set into a date set. More... | |
Set * | value_set (Datum value, meosType basetype) |
Convert a value into a set. More... | |
General functions for set values composed of an ordered list of distinct values.