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

General functions for temporal instants. More...

#include "temporal/tinstant.h"
#include <assert.h>
#include <postgres.h>
#include <utils/timestamp.h>
#include <common/hashfn.h>
#include <meos.h>
#include <meos_internal.h>
#include <meos_internal_geo.h>
#include "temporal/meos_catalog.h"
#include "temporal/postgres_types.h"
#include "temporal/tsequence.h"
#include "temporal/type_parser.h"
#include "temporal/type_util.h"
#include "geo/tgeo_spatialfuncs.h"
#include "geo/tspatial_parser.h"

Functions

bool intersection_tinstant_tinstant (const TInstant *inst1, const TInstant *inst2, TInstant **inter1, TInstant **inter2)
 Temporally intersect two temporal instants. More...
 
int tinstant_cmp (const TInstant *inst1, const TInstant *inst2)
 Return -1, 0, or 1 depending on whether the first temporal instant is less than, equal, or greater than the second one. More...
 
TInstanttinstant_copy (const TInstant *inst)
 Return a copy of a temporal instant. More...
 
bool tinstant_eq (const TInstant *inst1, const TInstant *inst2)
 Return true if two temporal instants are equal. More...
 
uint32 tinstant_hash (const TInstant *inst)
 Return the 32-bit hash value of a temporal instant. More...
 
TInstanttinstant_in (const char *str, meosType temptype)
 Return a temporal instant from its Well-Known Text (WKT) representation. More...
 
const TInstant ** tinstant_insts (const TInstant *inst, int *count)
 Return the singleton array of instants of a temporal instant. More...
 
TInstanttinstant_make (Datum value, meosType temptype, TimestampTz t)
 Return a temporal instant from the arguments. More...
 
TInstanttinstant_make_free (Datum value, meosType temptype, TimestampTz t)
 Return a temporal instant created from the values and free the base value after the creation. More...
 
char * tinstant_out (const TInstant *inst, int maxdd)
 Return the Well-Known Text (WKT) representation of a temporal instant. More...
 
void tinstant_set (TInstant *inst, Datum value, TimestampTz t)
 Return the first argument initialized with the value and the timestamptz. More...
 
void tinstant_set_tstzspan (const TInstant *inst, Span *s)
 Return in the last argument the time span of a temporal instant. More...
 
TInstanttinstant_shift_time (const TInstant *inst, const Interval *interv)
 Return a temporal instant shifted by an interval. More...
 
SpanSettinstant_time (const TInstant *inst)
 Return the time frame of a temporal instant as a span set. More...
 
TimestampTztinstant_timestamps (const TInstant *inst, int *count)
 Return the singleton array of timestamps of a temporal instant. More...
 
char * tinstant_to_string (const TInstant *inst, int maxdd, outfunc value_out)
 Return the Well-Known Text (WKT) representation of a temporal instant. More...
 
Datum tinstant_value (const TInstant *inst)
 Return a copy of the base value of a temporal instant. More...
 
bool tinstant_value_at_timestamptz (const TInstant *inst, TimestampTz t, Datum *result)
 Return in the last argument a copy of the the value of a temporal instant at a timestamptz. More...
 
Datum tinstant_value_p (const TInstant *inst)
 Return (a pointer to) the base value of a temporal instant. More...
 
Datumtinstant_values_p (const TInstant *inst, int *count)
 Return the singleton (pointer to the) base value of a temporal instant. More...
 
double tnumberinst_double (const TInstant *inst)
 Return the value of a temporal number instant converted to a double. More...
 
TInstanttnumberinst_shift_value (const TInstant *inst, Datum shift)
 Return a temporal instant whose value is shifted by a value. More...
 
SpanSettnumberinst_valuespans (const TInstant *inst)
 Return the base values of a temporal instant number as a span set. More...
 
TInstanttsequence_to_tinstant (const TSequence *seq)
 Return a temporal sequence transformed into a temporal instant. More...
 
TInstanttsequenceset_to_tinstant (const TSequenceSet *ss)
 Return a temporal sequence set transformed into a temporal instant. More...
 

Detailed Description

General functions for temporal instants.