MobilityDB 1.3
Loading...
Searching...
No Matches
Functions
span_meos.c File Reference

General functions for spans (a.k.a. More...

#include "temporal/span.h"
#include <assert.h>
#include <float.h>
#include <limits.h>
#include <utils/timestamp.h>
#include <common/hashfn.h>
#include <meos.h>
#include <meos_internal.h>
#include "temporal/postgres_types.h"
#include "temporal/set.h"
#include "temporal/temporal.h"
#include "temporal/tnumber_mathfuncs.h"
#include "temporal/type_parser.h"
#include "temporal/type_util.h"

Functions

Spanbigint_to_span (int i)
 Convert a big integer into a span. More...
 
Spanbigintspan_in (const char *str)
 Return an integer span from its Well-Known Text (WKT) representation. More...
 
int64 bigintspan_lower (const Span *s)
 Return the lower bound of an integer span. More...
 
Spanbigintspan_make (int64 lower, int64 upper, bool lower_inc, bool upper_inc)
 Return a big integer span from the bounds. More...
 
char * bigintspan_out (const Span *s)
 Return the Well-Known Text (WKT) representation of a big integer span. More...
 
Spanbigintspan_shift_scale (const Span *s, int64 shift, int64 width, bool hasshift, bool haswidth)
 Return a big integer span shifted and/or scaled by the values. More...
 
int64 bigintspan_upper (const Span *s)
 Return the upper bound of an integer span. More...
 
int64 bigintspan_width (const Span *s)
 Return the width of a big integer span. More...
 
Spandate_to_span (DateADT d)
 Convert a date into a span. More...
 
Spandatespan_in (const char *str)
 Return a date span from its Well-Known Text (WKT) representation. More...
 
DateADT datespan_lower (const Span *s)
 Return the lower bound of a date span. More...
 
Spandatespan_make (DateADT lower, DateADT upper, bool lower_inc, bool upper_inc)
 Return a date span from the bounds. More...
 
char * datespan_out (const Span *s)
 Return the Well-Known Text (WKT) representation of a date span. More...
 
Spandatespan_shift_scale (const Span *s, int shift, int width, bool hasshift, bool haswidth)
 Return a date span shifted and/or scaled by the values. More...
 
DateADT datespan_upper (const Span *s)
 Return the upper bound of a date span. More...
 
Spanfloat_to_span (double d)
 Convert a float into a span. More...
 
Spanfloatspan_in (const char *str)
 Return a float span from its Well-Known Text (WKT) representation. More...
 
double floatspan_lower (const Span *s)
 Return the lower bound of a float span. More...
 
Spanfloatspan_make (double lower, double upper, bool lower_inc, bool upper_inc)
 Return a float span from the bounds. More...
 
char * floatspan_out (const Span *s, int maxdd)
 Return the Well-Known Text (WKT) representation of a float span. More...
 
Spanfloatspan_shift_scale (const Span *s, double shift, double width, bool hasshift, bool haswidth)
 Return a float span shifted and/or scaled by the values. More...
 
double floatspan_upper (const Span *s)
 Return the upper bound of a float span. More...
 
double floatspan_width (const Span *s)
 Return the width of a float span. More...
 
Spanint_to_span (int i)
 Convert an integer into a span. More...
 
Spanintspan_in (const char *str)
 Return an integer span from its Well-Known Text (WKT) representation. More...
 
int intspan_lower (const Span *s)
 Return the lower bound of an integer span. More...
 
Spanintspan_make (int lower, int upper, bool lower_inc, bool upper_inc)
 Return an integer span from the bounds. More...
 
char * intspan_out (const Span *s)
 Return the Well-Known Text (WKT) representation of an integer span. More...
 
Spanintspan_shift_scale (const Span *s, int shift, int width, bool hasshift, bool haswidth)
 Return an integer span shifted and/or scaled by the values. More...
 
int intspan_upper (const Span *s)
 Return the upper bound of an integer span. More...
 
int intspan_width (const Span *s)
 Return the width of an integer span. More...
 
bool span_lower_inc (const Span *s)
 Return true if the lower bound of a span is inclusive. More...
 
bool span_upper_inc (const Span *s)
 Return true if the upper bound of a span is inclusive. More...
 
Spantimestamptz_to_span (TimestampTz t)
 Convert a timestamptz into a span. More...
 
Spantstzspan_in (const char *str)
 Return a timestamptz span from its Well-Known Text (WKT) representation. More...
 
TimestampTz tstzspan_lower (const Span *s)
 Return the lower bound of a timestamptz span. More...
 
Spantstzspan_make (TimestampTz lower, TimestampTz upper, bool lower_inc, bool upper_inc)
 Return a timestamptz span from the bounds. More...
 
char * tstzspan_out (const Span *s)
 Return the Well-Known Text (WKT) representation of a timestamtz span. More...
 
TimestampTz tstzspan_upper (const Span *s)
 Return the upper bound of a timestamptz span. More...
 

Detailed Description

General functions for spans (a.k.a.

ranges) composed of two Datum values and two Boolean values stating whether the bounds are inclusive