MobilityDB
1.0
|
Functions for parsing time types and temporal types. More...
#include "general/temporal_parser.h"
#include "general/periodset.h"
#include "general/period.h"
#include "general/timestampset.h"
#include "general/temporaltypes.h"
#include "general/temporal_util.h"
Functions | |
void | p_whitespace (char **str) |
Input a white space from the buffer. More... | |
void | ensure_end_input (char **str, bool end) |
Ensure there is no more input excepted white spaces. More... | |
bool | p_obrace (char **str) |
Input an opening brace from the buffer. More... | |
bool | p_cbrace (char **str) |
Input a closing brace from the buffer. More... | |
bool | p_obracket (char **str) |
Input an opening bracket from the buffer. More... | |
bool | p_cbracket (char **str) |
Input a closing bracket from the buffer. More... | |
bool | p_oparen (char **str) |
Input an opening parenthesis from the buffer. More... | |
bool | p_cparen (char **str) |
Input a closing parenthesis from the buffer. More... | |
bool | p_comma (char **str) |
Input a comma from the buffer. More... | |
double | double_parse (char **str) |
Input a double from the buffer. More... | |
Datum | basetype_parse (char **str, Oid basetype) |
Parse a base value from the buffer. More... | |
TBOX * | tbox_parse (char **str) |
Parse a temporal box value from the buffer. More... | |
TimestampTz | timestamp_parse (char **str) |
Parse a timestamp value from the buffer. More... | |
Period * | period_parse (char **str, bool make) |
Parse a period value from the buffer. More... | |
TimestampSet * | timestampset_parse (char **str) |
Parse a timestamp set value from the buffer. More... | |
PeriodSet * | periodset_parse (char **str) |
Parse a period set value from the buffer. More... | |
TInstant * | tinstant_parse (char **str, Oid basetype, bool end, bool make) |
Parse a temporal instant value from the buffer. More... | |
static TInstantSet * | tinstantset_parse (char **str, Oid basetype) |
Parse a temporal instant set value from the buffer. More... | |
static TSequence * | tsequence_parse (char **str, Oid basetype, bool linear, bool end, bool make) |
Parse a temporal sequence value from the buffer. More... | |
static TSequenceSet * | tsequenceset_parse (char **str, Oid basetype, bool linear) |
Parse a temporal sequence set value from the buffer. More... | |
Temporal * | temporal_parse (char **str, Oid basetype) |
Parse a temporal value from the buffer (dispatch function) More... | |
Functions for parsing time types and temporal types.
Many functions make two passes for parsing, the first one to obtain the number of elements in order to do memory allocation with palloc
, the second one to create the type. This is the only approach we can see at the moment which is both correct and simple.