MobilityDB 1.3
Loading...
Searching...
No Matches
Macros | Functions | Variables
meos_catalog.c File Reference

Create a cache of metadata information about temporal types and span types in global constant arrays. More...

#include "temporal/meos_catalog.h"
#include <assert.h>
#include <limits.h>
#include <postgres.h>
#include <common/hashfn.h>
#include <meos.h>
#include "temporal/doublen.h"

Macros

#define INTERP_STR_MAXLEN   8
 
#define TEMPSUBTYPE_STR_MAXLEN   12
 

Functions

bool alphanum_basetype (meosType type)
 Return true if the type is an alphanumeric base type. More...
 
bool alphanum_temptype (meosType type)
 Return true if the type is an alphanumeric base type. More...
 
bool alphanumset_type (meosType type)
 Return true if the type is a set type. More...
 
bool basetype_byvalue (meosType type)
 Return true if the values of the base type are passed by value. More...
 
int16 basetype_length (meosType type)
 Return the length of a base type. More...
 
meosType basetype_settype (meosType type)
 Return the base type from the set type. More...
 
meosType basetype_spantype (meosType type)
 Return the span type of a base type. More...
 
bool basetype_varlength (meosType type)
 Return true if the values of the base type are of variable length. More...
 
bool ensure_geoset_type (meosType type)
 Ensure that a set value is a geo set. More...
 
bool ensure_numset_type (meosType type)
 Ensure that the type is a number set type. More...
 
bool ensure_numspan_type (meosType type)
 Ensure that a span is a number span type. More...
 
bool ensure_set_spantype (meosType type)
 Ensure that a set value is a set type with a span as a bounding box. More...
 
bool ensure_span_tbox_type (meosType type)
 Return true if the type can be converted to a temporal box. More...
 
bool ensure_spatialset_type (meosType type)
 Ensure that a temporal value is a temporal number. More...
 
bool ensure_tgeo_type (meosType type)
 Ensure that a type is a temporal geo type. More...
 
bool ensure_tgeo_type_all (meosType type)
 Ensure that a type is a temporal type with geometry/geography as base type. More...
 
bool ensure_tgeodetic_type (meosType type)
 Ensure that a type is a temporal geodetic type. More...
 
bool ensure_tgeometry_type (meosType type)
 Ensure that a type is a temporal geometry type. More...
 
bool ensure_timespanset_type (meosType type)
 Ensure that a span is a time span type. More...
 
bool ensure_tnumber_basetype (meosType type)
 Ensure that a type is a temporal number base type. More...
 
bool ensure_tnumber_tpoint_type (meosType type)
 Ensure that a type is a temporal number or a temporal point type. More...
 
bool ensure_tnumber_type (meosType type)
 Ensure that a type is a temporal number. More...
 
bool ensure_tpoint_type (meosType type)
 Ensure that a type is a temporal point type. More...
 
bool ensure_tspatial_type (meosType type)
 Ensure that attype is a spatiotemporal type. More...
 
bool geo_basetype (meosType type)
 Return true if the type is a geo base type. More...
 
bool geoset_type (meosType type)
 Return true if the type is a geo set type. More...
 
interpType interptype_from_string (const char *str)
 Get the interpolation type from the interpolation string. More...
 
const char * interptype_name (interpType interp)
 Return the string representation of the subtype of the temporal type corresponding to the enum value. More...
 
bool meos_basetype (meosType type)
 Return true if the type is a base type of one of the template types, that is, Set, Span, SpanSet, and Temporal. More...
 
meosOper meosoper_from_string (const char *str)
 Fetch the operator number from its name. More...
 
const char * meosoper_name (meosOper oper)
 Return the string name from a MEOS operator number. More...
 
const char * meostype_name (meosType type)
 Return the string representation of the MEOS type. More...
 
bool numset_type (meosType type)
 Return true if the type is a number set type. More...
 
bool numspan_basetype (meosType type)
 Return true if the type is a number span type. More...
 
bool numspan_type (meosType type)
 Return true if the type is a number span type. More...
 
bool set_basetype (meosType type)
 Return true if the type is a base type of a set type. More...
 
bool set_spantype (meosType type)
 Return true if the type is a set type with a span as a bounding box. More...
 
bool set_type (meosType type)
 Return true if the type is a set type. More...
 
meosType settype_basetype (meosType type)
 Return the base type from a set type. More...
 
bool span_basetype (meosType type)
 Return true if the type is a span base type. More...
 
bool span_canon_basetype (meosType type)
 Return true if the type is a canonical base type of a span type. More...
 
bool span_tbox_type (meosType type)
 Return true if the type can be converted to a temporal box. More...
 
bool span_type (meosType type)
 Return true if the type is a span type. More...
 
bool spanset_type (meosType type)
 Return true if the type is a span set type. More...
 
meosType spansettype_spantype (meosType type)
 Return the span type from the span set type. More...
 
meosType spantype_basetype (meosType type)
 Return the base type from the span type. More...
 
meosType spantype_spansettype (meosType type)
 Return the span type from the span set type. More...
 
bool spatial_basetype (meosType type)
 Return true if the type is a spatial base type. More...
 
bool spatialset_type (meosType type)
 Return true if the type is a geo set type. More...
 
bool talpha_type (meosType type)
 Return true if the type is a temporal alpha type (i.e., those whose bounding box is a timestamptz span) More...
 
bool talphanum_type (meosType type)
 Return true if the type is a temporal alphanumeric type. More...
 
bool temporal_basetype (meosType type)
 Return true if the type is a temporal base type. More...
 
bool temporal_type (meosType type)
 Return true if the type is an external temporal type. More...
 
bool tempsubtype_from_string (const char *str, int16 *subtype)
 Return the enum value corresponding to the string representation of the concrete subtype of a temporal type. More...
 
const char * tempsubtype_name (tempSubtype subtype)
 Return the string representation of the subtype of the temporal type corresponding to the enum value. More...
 
meosType temptype_basetype (meosType type)
 Return the base type from the temporal type. More...
 
bool temptype_continuous (meosType type)
 Return true if the type is a temporal continuous type. More...
 
bool temptype_subtype (tempSubtype subtype)
 Ensure that the subtype of a temporal value is valid. More...
 
bool temptype_subtype_all (tempSubtype subtype)
 Ensure that the subtype of a temporal value is valid. More...
 
bool tgeo_type (meosType type)
 Return true if a type is a temporal geo type. More...
 
bool tgeo_type_all (meosType type)
 Return true if a type is a temporal type with geometry/geography as base type. More...
 
bool tgeodetic_type (meosType type)
 Return true if a type is a temporal geodetic type. More...
 
bool tgeometry_type (meosType type)
 Return true if a type is a temporal geometry type. More...
 
bool time_type (meosType type)
 Return true if the type is a time type. More...
 
bool timeset_type (meosType type)
 Return true if the type is a time set type. More...
 
bool timespan_basetype (meosType type)
 Return true if the type is a time span type. More...
 
bool timespan_type (meosType type)
 Return true if the type is a time span type. More...
 
bool timespanset_type (meosType type)
 Return true if the type is a time span type. More...
 
bool tnumber_basetype (meosType type)
 Return true if the type is a temporal number base type. More...
 
bool tnumber_spantype (meosType type)
 Return true if the type is a span number type. More...
 
bool tnumber_type (meosType type)
 Return true if the type is a temporal number type. More...
 
bool tpoint_type (meosType type)
 Return true if a type is a temporal point type. More...
 
bool tspatial_type (meosType type)
 Return true if a type is a spatiotemporal type. More...
 
bool type_span_bbox (meosType type)
 Return true if the type has a span type as bounding box. More...
 

Variables

static const char * MEOS_INTERPTYPE_NAMES []
 Global constant array containing the interpolation names corresponding to the enumeration interpType defined in file meos_catalog.h More...
 
static const char * MEOS_OPER_NAMES []
 Global constant array containing the operator names corresponding to the enumeration meosOper defined in file meos_catalog.h More...
 
static const settype_catalog_struct MEOS_SETTYPE_CATALOG []
 Global constant array that keeps type information for the defined set types. More...
 
static const spansettype_catalog_struct MEOS_SPANSETTYPE_CATALOG []
 Global constant array that keeps type information for the defined span set types. More...
 
static const spantype_catalog_struct MEOS_SPANTYPE_CATALOG []
 Global constant array that keeps type information for the defined span types. More...
 
static const char * MEOS_TEMPSUBTYPE_NAMES []
 Global constant array storing the string representation of the concrete subtypes of temporal types. More...
 
static const temptype_catalog_struct MEOS_TEMPTYPE_CATALOG []
 Global constant array that keeps type information for the defined temporal types. More...
 
static const char * MEOS_TYPE_NAMES []
 Global constant array containing the type names corresponding to the enumeration meosType defined in file meos_catalog.h More...
 

Detailed Description

Create a cache of metadata information about temporal types and span types in global constant arrays.