MobilityDB
1.0
|
Basic functions for temporal instants. More...
#include <postgres.h>
#include <catalog/pg_type.h>
#include <utils/array.h>
#include <utils/rangetypes.h>
#include "temporal.h"
#include "point/postgis.h"
Go to the source code of this file.
Functions | |
TInstant * | tinstant_make (Datum value, TimestampTz t, Oid basetypid) |
Construct a temporal instant value from the arguments. More... | |
TInstant * | tinstant_copy (const TInstant *inst) |
Returns a copy of the temporal instant value. More... | |
Datum * | tinstant_value_ptr (const TInstant *inst) |
Returns a pointer to the base value of the temporal instant value. More... | |
Datum | tinstant_value (const TInstant *inst) |
Returns the base value of the temporal value. More... | |
Datum | tinstant_value_copy (const TInstant *inst) |
Returns a copy of the base value of the temporal instant value. More... | |
void | tinstant_set (TInstant *inst, Datum value, TimestampTz t) |
Sets the value and the timestamp of the temporal instant value. More... | |
char * | tinstant_to_string (const TInstant *inst, char *(*value_out)(Oid, Datum)) |
Returns the string representation of the temporal value. More... | |
void | tinstant_write (const TInstant *inst, StringInfo buf) |
Write the binary representation of the temporal value into the buffer. More... | |
TInstant * | tinstant_read (StringInfo buf, Oid basetypid) |
Returns a new temporal value from its binary representation read from the buffer. More... | |
bool | intersection_tinstant_tinstant (const TInstant *inst1, const TInstant *inst2, TInstant **inter1, TInstant **inter2) |
Temporally intersect the two temporal values. More... | |
Temporal * | tinstant_merge (const TInstant *inst1, const TInstant *inst2) |
Merge two temporal instant values. More... | |
Temporal * | tinstant_merge_array (const TInstant **instants, int count) |
Merge the array of temporal instant values. More... | |
TInstant * | tintinst_to_tfloatinst (const TInstant *inst) |
Cast the temporal integer value as a temporal float value. More... | |
TInstant * | tfloatinst_to_tintinst (const TInstant *inst) |
Cast the temporal float value as a temporal integer value. More... | |
TInstant * | tinstantset_to_tinstant (const TInstantSet *ti) |
Transform the temporal instant set value into a temporal instant value. More... | |
TInstant * | tsequence_to_tinstant (const TSequence *seq) |
Transform the temporal sequence value into a temporal instant value. More... | |
TInstant * | tsequenceset_to_tinstant (const TSequenceSet *ts) |
Transform the temporal sequence set value into a temporal instant value. More... | |
ArrayType * | tinstant_values_array (const TInstant *inst) |
Returns the base value of the temporal value as an array. More... | |
ArrayType * | tfloatinst_ranges (const TInstant *inst) |
Returns the base value of the temporal float value as a range. More... | |
PeriodSet * | tinstant_get_time (const TInstant *inst) |
Returns the time on which the temporal value is defined as a period set. More... | |
void | tinstant_period (Period *p, const TInstant *inst) |
Returns the bounding period on which the temporal instant value is defined. More... | |
ArrayType * | tinstant_sequences_array (const TInstant *inst) |
Returns the sequences of the temporal value as a PostgreSQL array. More... | |
ArrayType * | tinstant_timestamps (const TInstant *inst) |
Returns the timestamp of the temporal value as an array. More... | |
const TInstant ** | tinstant_instants (const TInstant *inst, int *count) |
Returns the instants of the temporal value as a C array. More... | |
ArrayType * | tinstant_instants_array (const TInstant *inst) |
Returns the temporal value as an array. More... | |
TInstant * | tinstant_shift (const TInstant *inst, const Interval *interval) |
Shift the time span of the temporal value by the interval. More... | |
bool | tinstant_ever_eq (const TInstant *inst, Datum value) |
Returns true if temporal value is ever equal to the base value. More... | |
bool | tinstant_ever_lt (const TInstant *inst, Datum value) |
Returns true if the temporal value is ever less than the base value. More... | |
bool | tinstant_ever_le (const TInstant *inst, Datum value) |
Returns true if the temporal value is ever less than or equal to the base value. More... | |
bool | tinstant_always_eq (const TInstant *inst, Datum value) |
Returns true if temporal value is always equal to the base value. More... | |
bool | tinstant_always_lt (const TInstant *inst, Datum value) |
Returns true if the temporal value is always less than the base value. More... | |
bool | tinstant_always_le (const TInstant *inst, Datum value) |
Returns true if the temporal value is always less than or equal to the base value. More... | |
TInstant * | tinstant_restrict_value (const TInstant *inst, Datum value, bool atfunc) |
Restricts the temporal value to (the complement of) the base value. More... | |
bool | tinstant_restrict_values_test (const TInstant *inst, const Datum *values, int count, bool atfunc) |
Returns true if the temporal value satisfies the restriction to the (complement of the) array of base values. More... | |
TInstant * | tinstant_restrict_values (const TInstant *inst, const Datum *values, int count, bool atfunc) |
Restricts the temporal value to the array of base values. More... | |
bool | tnumberinst_restrict_range_test (const TInstant *inst, const RangeType *range, bool atfunc) |
Returns true if the temporal number satisfies the restriction to the (complement of the) range of base values. More... | |
TInstant * | tnumberinst_restrict_range (const TInstant *inst, const RangeType *range, bool atfunc) |
Restricts the temporal number to the (complement of the) range of base values. More... | |
bool | tnumberinst_restrict_ranges_test (const TInstant *inst, RangeType **normranges, int count, bool atfunc) |
Returns true if the temporal number satisfies the restriction to the (complement of the) array of ranges of base values. More... | |
TInstant * | tnumberinst_restrict_ranges (const TInstant *inst, RangeType **normranges, int count, bool atfunc) |
Restricts the temporal number to the (complement of the) array of ranges of base values. More... | |
TInstant * | tinstant_restrict_timestamp (const TInstant *inst, TimestampTz t, bool atfunc) |
Restricts the temporal value to the (complement of the) timestamp. More... | |
bool | tinstant_value_at_timestamp (const TInstant *inst, TimestampTz t, Datum *result) |
Returns the base value of the temporal value at the timestamp. More... | |
bool | tinstant_restrict_timestampset_test (const TInstant *inst, const TimestampSet *ts, bool atfunc) |
Returns true if the temporal value satisfies the restriction to the timestamp set. More... | |
TInstant * | tinstant_restrict_timestampset (const TInstant *inst, const TimestampSet *ts, bool atfunc) |
Restricts the temporal value to the timestamp set. More... | |
TInstant * | tinstant_restrict_period (const TInstant *inst, const Period *p, bool atfunc) |
Restricts the temporal value to the period. More... | |
bool | tinstant_restrict_periodset_test (const TInstant *inst, const PeriodSet *ps, bool atfunc) |
Returns true if the temporal value satisfies the restriction to the timestamp set. More... | |
TInstant * | tinstant_restrict_periodset (const TInstant *inst, const PeriodSet *ps, bool atfunc) |
Restricts the temporal value to the period set. More... | |
bool | tinstant_intersects_timestamp (const TInstant *inst, TimestampTz t) |
Returns true if the temporal value intersects the timestamp. More... | |
bool | tinstant_intersects_timestampset (const TInstant *inst, const TimestampSet *ts) |
Returns true if the temporal value intersects the timestamp set. More... | |
bool | tinstant_intersects_period (const TInstant *inst, const Period *p) |
Returns true if the temporal value intersects the period. More... | |
bool | tinstant_intersects_periodset (const TInstant *inst, const PeriodSet *ps) |
Returns true if the temporal value intersects the period set. More... | |
int | tinstant_cmp (const TInstant *inst1, const TInstant *inst2) |
Returns -1, 0, or 1 depending on whether the first temporal value is less than, equal, or greater than the second one. More... | |
bool | tinstant_eq (const TInstant *inst1, const TInstant *inst2) |
Returns true if the two temporal instant values are equal. More... | |
uint32 | tinstant_hash (const TInstant *inst) |
Returns the hash value of the temporal value. More... | |
Basic functions for temporal instants.