Time series API routines

The time series application programming interface routines allow application programmers to directly access a time series datum.

You can scan and update a set of time series elements, or a single element referenced by either a time stamp or a time series index. These routines can be used in client programs that fetch time series data in binary mode or in registered server or client routines that have an argument or return value of a time series type.

If there is a failure, these routines raise an error condition and do not return a value.

On UNIX™, these routines exist in two archives: tsfeapi.a and tsbeapi.a. To use any of these routines, include the tsbeapi.a file when producing a shared library for the server, or use tsfeapi.a when compiling a client application.

The tseries.h header file must be included when there are calls to any of the time series interface routines.

On UNIX, tsfeapi.a, tsbeapi.a, and tseries.h are all in the lib directory in the database server installation.

On Windows™, these routines exist in two archives: tsfeapi.lib and tsbeapi.lib. To use any of these routines, include the tsbeapi.lib file when producing a shared library for the server, or use tsfeapi.lib when compiling a client application.

The tseries.h header file must be included when there are calls to any of the time series interface routines.

On Windows, tsfeapi.lib, tsbeapi.lib, and tseries.h are all in the lib directory in the database server installation.

Important: Because values returned by mi_value are valid only until the next mi_next_row or mi_query_finish call, it might be necessary to put time series in save sets or to use ts_copy to access time series outside an mi_get_results loop.