MobilityDB 1.1
Functions
tinstant.c File Reference
#include "general/tinstant.h"
#include <assert.h>
#include <postgres.h>
#include <utils/timestamp.h>
#include <access/hash.h>
#include <meos.h>
#include <meos_internal.h>
#include "general/pg_types.h"
#include "general/temporaltypes.h"
#include "general/type_parser.h"
#include "general/type_util.h"
#include "point/tpoint_parser.h"
#include "point/tpoint_spatialfuncs.h"
Include dependency graph for tinstant.c:

Functions

bool intersection_tinstant_tinstant (const TInstant *inst1, const TInstant *inst2, TInstant **inter1, TInstant **inter2)
 Temporally intersect two temporal instants. More...
 
TInstanttboolinst_in (const char *str)
 Return a temporal instant boolean from its Well-Known Text (WKT) representation. More...
 
TInstanttboolinst_make (bool b, TimestampTz t)
 Construct a temporal instant boolean from the arguments. More...
 
TInstanttfloatinst_in (const char *str)
 Return a temporal instant float from its Well-Known Text (WKT) representation. More...
 
TInstanttfloatinst_make (double d, TimestampTz t)
 Construct a temporal instant float from the arguments. More...
 
SpanSettfloatinst_spanset (const TInstant *inst)
 Return the span set of a temporal instant float. More...
 
TInstanttfloatinst_to_tintinst (const TInstant *inst)
 Cast a temporal instant float to a temporal instant integer. More...
 
TInstanttgeogpointinst_in (const char *str)
 Return a temporal instant geographic point from its Well-Known Text (WKT) representation. More...
 
TInstanttgeogpointinst_make (const GSERIALIZED *gs, TimestampTz t)
 Construct a temporal instant geographic point from the arguments. More...
 
TInstanttgeompointinst_in (const char *str)
 Return a temporal instant geometric point from its Well-Known Text (WKT) representation. More...
 
TInstanttgeompointinst_make (const GSERIALIZED *gs, TimestampTz t)
 Construct a temporal instant geometric point from the arguments. More...
 
bool tinstant_always_eq (const TInstant *inst, Datum value)
 Return true if a temporal instant is always equal to a base value. More...
 
bool tinstant_always_le (const TInstant *inst, Datum value)
 Return true if a temporal instant is always less than or equal to a base value. More...
 
bool tinstant_always_lt (const TInstant *inst, Datum value)
 Return true if a temporal instant is always less than a base value. 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...
 
bool tinstant_ever_eq (const TInstant *inst, Datum value)
 Return true if a temporal instant is ever equal to a base value. More...
 
bool tinstant_ever_le (const TInstant *inst, Datum value)
 Return true if a temporal instant is ever less than or equal to a base value. More...
 
bool tinstant_ever_lt (const TInstant *inst, Datum value)
 Return true if a temporal instant is ever less than a base value. 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_instants (const TInstant *inst, int *count)
 Return the singleton array of instants of a temporal instant. More...
 
TInstanttinstant_make (Datum value, meosType temptype, TimestampTz t)
 Construct a temporal instant from the arguments. More...
 
Temporaltinstant_merge (const TInstant *inst1, const TInstant *inst2)
 Merge two temporal instants. More...
 
Temporaltinstant_merge_array (const TInstant **instants, int count)
 Merge an array of temporal instants. More...
 
char * tinstant_out (const TInstant *inst, int maxdd)
 Return the Well-Known Text (WKT) representation of a temporal instant. More...
 
TInstanttinstant_restrict_period (const TInstant *inst, const Span *period, bool atfunc)
 Restrict a temporal instant to (the complement of) a period. More...
 
TInstanttinstant_restrict_periodset (const TInstant *inst, const SpanSet *ps, bool atfunc)
 Restrict a temporal instant to (the complement of) a period set. More...
 
bool tinstant_restrict_periodset_test (const TInstant *inst, const SpanSet *ps, bool atfunc)
 Return true if a temporal instant satisfies the restriction to (the complement of) a timestamp set. More...
 
TInstanttinstant_restrict_timestamp (const TInstant *inst, TimestampTz t, bool atfunc)
 Restrict a temporal instant to (the complement of) a timestamp. More...
 
TInstanttinstant_restrict_timestampset (const TInstant *inst, const Set *ts, bool atfunc)
 Restrict a temporal instant to (the complement of) a timestamp set. More...
 
bool tinstant_restrict_timestampset_test (const TInstant *inst, const Set *ts, bool atfunc)
 Return true if a temporal instant satisfies the restriction to (the complement of) a timestamp set. More...
 
TInstanttinstant_restrict_value (const TInstant *inst, Datum value, bool atfunc)
 Restrict a temporal instant to (the complement of) a base value. More...
 
TInstanttinstant_restrict_values (const TInstant *inst, const Set *set, bool atfunc)
 Restrict a temporal instant to an array of base values. More...
 
bool tinstant_restrict_values_test (const TInstant *inst, const Set *set, bool atfunc)
 Return true if a temporal instant satisfies the restriction to (the complement of) an array of base values. More...
 
TSequence ** tinstant_sequences (const TInstant *inst, int *count)
 Return the singleton array of sequences of a temporal instant. More...
 
void tinstant_set (TInstant *inst, Datum value, TimestampTz t)
 Set the value and the timestamp of a temporal instant. More...
 
void tinstant_set_period (const TInstant *inst, Span *p)
 Return the bounding period of a temporal instant. More...
 
TInstanttinstant_shift (const TInstant *inst, const Interval *interval)
 Return a temporal instant shifted by an interval. More...
 
SpanSettinstant_time (const TInstant *inst)
 Return the time frame of a temporal instant as a period 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)
 General functions for temporal instants. More...
 
bool tinstant_value_at_timestamp (const TInstant *inst, TimestampTz t, Datum *result)
 Return the base value of a temporal instant at a timestamp. More...
 
Datum tinstant_value_copy (const TInstant *inst)
 Return a copy of the base value of a temporal instant. More...
 
Datumtinstant_values (const TInstant *inst, int *count)
 Return the singleton array of base values of a temporal instant. More...
 
TInstanttintinst_in (const char *str)
 Return a temporal instant integer from its Well-Known Text (WKT) representation. More...
 
TInstanttintinst_make (int i, TimestampTz t)
 Construct a temporal instant integer from the arguments. More...
 
TInstanttintinst_to_tfloatinst (const TInstant *inst)
 Cast a temporal instant integer to a temporal instant float. More...
 
double tnumberinst_double (const TInstant *inst)
 Convert the value of temporal number instant to a double. More...
 
TInstanttnumberinst_restrict_span (const TInstant *inst, const Span *span, bool atfunc)
 Restrict a temporal number instant to (the complement of) a span of base values. More...
 
bool tnumberinst_restrict_span_test (const TInstant *inst, const Span *span, bool atfunc)
 Return true if a temporal number instant satisfies the restriction to (the complement of) a span of base values. More...
 
TInstanttnumberinst_restrict_spanset (const TInstant *inst, const SpanSet *ss, bool atfunc)
 Restrict a temporal number instant to (the complement of) a span set. More...
 
bool tnumberinst_restrict_spanset_test (const TInstant *inst, const SpanSet *ss, bool atfunc)
 Return true if a temporal number satisfies the restriction to (the complement of) an array of spans of base values. More...
 
TInstanttsequence_to_tinstant (const TSequence *seq)
 Return a temporal sequence transformed into a temporal instant. More...
 
TInstanttsequenceset_to_tinstant (const TSequenceSet *ts)
 Return a temporal sequence set transformed into a temporal instant. More...
 
TInstantttextinst_in (const char *str)
 Return a temporal instant text from its Well-Known Text (WKT) representation. More...
 
TInstantttextinst_make (const text *txt, TimestampTz t)
 Construct a temporal instant text from the arguments. More...