RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT > Class Template Reference

Template class for restoring an aggregate classe. More...

#include "rdm_time_series_restore_aggregate.h"

Inheritance diagram for RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >:
Inheritance graph
Collaboration diagram for RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >:
Collaboration graph

Public Member Functions

uint8_t * serialize (uint8_t *buffer)
uint8_t * unserialize (uint8_t *buffer)
RDM_RETCODE init (RDM_DB p_db)
Initialize this object. More...
void reset (void)
Reset this object. More...
template<class SOURCE_VALUE_T >
RDM_RETCODE put_value (SOURCE_VALUE_T *psource_value, RDM::DB::TRANSACTIONAL_T=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving a data value. More...
template<class SOURCE_STATS_T >
RDM_RETCODE put_stats (SOURCE_STATS_T *psource_stats, RDM::DB::TRANSACTIONAL_T=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving statistics. More...
template<class SOURCE_RANGE_T >
RDM_RETCODE put_range (SOURCE_RANGE_T *psource_range, RDM::DB::TRANSACTIONAL_T=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving ranges. More...
- Public Member Functions inherited from RDM::TIME_SERIES::custom< NEXT >
uint8_t * serialize (uint8_t *buffer)
uint8_t * unserialize (uint8_t *buffer)
RDM_RETCODE init (RDM_DB db)
Initialize this object. More...
void reset (void)
Reset this object. More...
RDM_RETCODE flush_value (uint32_t threshold=1, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Flush this object. More...
RDM_RETCODE flush_stats (uint32_t threshold=1, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Flush this object. More...
RDM_RETCODE flush_range (uint32_t threshold=1, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Flush this object. More...
template<class SOURCE_VALUE_T >
RDM_RETCODE put_value (SOURCE_VALUE_T *source_value, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving a data value. More...
template<class SOURCE_STATS_T >
RDM_RETCODE put_stats (SOURCE_STATS_T *source_stats, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving statistics. More...
template<class SOURCE_RANGE_T >
RDM_RETCODE put_range (SOURCE_RANGE_T *source_range, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving ranges. More...

Static Public Member Functions

constexpr static int get_serialize_size (void)
Get the size of a buffer for serialization to hold its state. More...
- Static Public Member Functions inherited from RDM::TIME_SERIES::custom< NEXT >
constexpr static int get_serialize_size (void)
Get the size of a buffer for serialization to hold its state. More...

Additional Inherited Members

- Protected Member Functions inherited from RDM::TIME_SERIES::custom< NEXT >
uint32_t init_tables_to_write_lock (RDM_TABLE_ID *tables)
IDs of the tables where rows are inserted. More...
uint32_t init_tables_to_read_lock (RDM_TABLE_ID *tables)
IDs of the tables where rows are read. More...
void unput (void)
Undo a previous put operation. More...
void unflush (void)
Undo a previous flush operation. More...
- Static Protected Member Functions inherited from RDM::TIME_SERIES::custom< NEXT >
constexpr static int number_of_tables_to_write_lock (void)
Number of tables where rows are inserted. More...
constexpr static int number_of_tables_to_read_lock (void)
Number of tables where rows are read. More...

Detailed Description

template<class TIME_STAMP_KEY_T, RDM_KEY_ID SOURCE_TIME_STAMP_KEY, RDM_KEY_ID AGGREGATE_TIME_STAMP_KEY, class NEXT>
class RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >

Template class for restoring an aggregate classe.

This template class can be used to restore the state of an aggregate class.

Before we explain exactly how this class works, let's consider the following scenario:

split <insert_row <TABLE_SOURCE>
stats <32, AGGREGATE, insert_row <TABLE_AGGREGATE>>> ts;

When data is fed into the above class chain using ts.put_data(), the data will be inserted into the SOURCE table, and for every 32 rows inserted into the first table, a row with statistics will be inserted into the AGGREGATE table. However, if the program where this code is deployed is shut down and restarted, any rows left over in the aggregation (the stats class) after the last statistics has been inserted will not get counted towards any statistics.

Calling ts.flush_value() before shutdown can force statistics to be generated for the left over data. However, this is not always desireable or possible. For example, the RaimaDB Fast Fourier Transform (FFT) APIs classes are not able to honor a flush. The same is the case for the downsample class.

This class can remedy this. It is able to feed the missing data into the aggregation class (stats) when started up. If set up correctly, it will look up the last row from the AGGREGATE table and feed all the rows from the SOURCE table that have a timestamp greater than the timestamps in the AGGREGATE table into the stats class.

For this to work correctly, the above class chain has to be arranged slightly differently. The order of the two classes in the split has to be reversed. This class can then be inserted between the split and the stats class as follows:

split <restore_aggregate<UINT64_t,
KEY_SOURCE_TIME_STAMP_CURRENT,
KEY_AGGREGATE_TIME_STAMP_LAST,
stats <32, AGGREGATE,
insert_row <TABLE_AGGREGATE>>>
insert_row <TABLE_SOURCE>> ts;

This class can be used to restore the state for any aggregate class where it is sufficient to just feed some of the last original data to restore the state. For this to work, timestamp has to increase in value over time and the source and aggregate data must both be present.

It is even possible to restore the state for a chain of aggregate classes as long as there is access to the original data and the final aggregated data. Classes that do certain transformations can also be in the mix.

Template Parameters
TIME_STAMP_KEY_T The type for the timestamp keys specified next. The type for SOURCE and the TARGET time stamps are required to be the same.
SOURCE_TIME_STAMP_KEY The key ID to look up the timestamp for the SOURCE table. The key must be a key for the current or the last timestamp.
AGGREGATE_TIME_STAMP_KEY The key ID to look up the timestamp for the AGGREGATE table. The key must be a key for the current or the last timestamp.
NEXT The class in the chain to receive data
Examples
time_series_restore_aggregate.cpp.

Member Function Documentation

get_serialize_size()

template<class TIME_STAMP_KEY_T , RDM_KEY_ID SOURCE_TIME_STAMP_KEY, RDM_KEY_ID AGGREGATE_TIME_STAMP_KEY, class NEXT >
constexpr static int RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >::get_serialize_size ( void )
inlinestaticconstexpr

Get the size of a buffer for serialization to hold its state.

Get the size needed for a buffer to hold the state of this object.

121 {
122return sizeof (restored_aggregate) + NEXT::get_serialize_size ();
123 }

init()

template<class TIME_STAMP_KEY_T , RDM_KEY_ID SOURCE_TIME_STAMP_KEY, RDM_KEY_ID AGGREGATE_TIME_STAMP_KEY, class NEXT >
RDM_RETCODE RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >::init ( RDM_DB p_db )
inline

Initialize this object.

Call this method before sending it any data values, ranges, or statistics.

Return values
sOKAY Normal, successful return.
eINVARG Invalid argument.
eDBNOTOPEN Database not open.
eCURSORDB Cursor is associated with a different database.
ePRECOMMITTED A precommitted transaction must be committed or rolled back before further operations on this database are allowed.
Parameters
p_db [IN] Use this database for chained classes that need to insert rows
162 {
164
165if (rc == sOKAY)
166 {
167 restored_aggregate = false;
168 restore_aggregate::db = p_db;
169 }
170
171return rc;
172 }

References sOKAY.

put_range()

template<class TIME_STAMP_KEY_T , RDM_KEY_ID SOURCE_TIME_STAMP_KEY, RDM_KEY_ID AGGREGATE_TIME_STAMP_KEY, class NEXT >
template<class SOURCE_RANGE_T >
RDM_RETCODE RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >::put_range ( SOURCE_RANGE_T * psource_range,
RDM::DB::TRANSACTIONAL_T = RDM::DB::NOT_TRANSACTIONAL
)
inline

Template method for receiving ranges.

Receive one range and process it accordingly.

The type for the value provided is required to have columns for 'time_stamp_first', 'time_stamp_last', and 'value_range' with appropriate types. The column 'value_range' must be an array that is able to hold a static number of elements. Such a type can be generated using rdm-compile with a schema including a table similar to this:

CREATE TABLE range
(
value_range DOUBLE ARRAY [32] NOT NULL,
time_stamp_first UINT64 NOT NULL,
time_stamp_last UINT64 PRIMARY KEY
);

This operation can be specified as being transactional. However, if the caller always rolls back the transaction in the case of a failure, there is no need to specify single operations to be transactional.

Template Parameters
SOURCE_RANGE_T The actual type of the range received.
Return values
sOKAY Normal, successful return.
eNOSTARTUPDATE An update operation was attempted when no rdm_dbStartUpdate() is active.
eNOTLOCKED Attempt to access a table for reading or update without proper locks.
eCURSORDB Cursor is associated with a different database.
eDBNOTOPEN Database not open.
ePRECOMMITTED A precommitted transaction must be committed or rolled back before further operations on this database are allowed.
eDUPLICATE Attempt to insert a duplicate value as a unique/primary key.
eREADONLY Database is read-only and cannot be updated.
eREFINTEGRITY Integrity constraint violation.
eROWLIMIT Table row limit reached.
eINVARG Invalid argument.
Parameters
[in] psource_range The source range sent to this class
463 {
464RDM_RETCODE rc = sOKAY;
465
466if (restored_aggregate == false)
467 {
468RDM_CURSOR cursor = NULL;
469 rc = rdm_dbGetRowsByKey (db, AGGREGATE_TIME_STAMP_KEY, &cursor);
470
471if (rc == sOKAY)
472 {
473 rc = rdm_cursorMoveToLast (cursor);
474if (rc == sENDOFCURSOR)
475 {
476 rc = rdm_dbGetRowsByKey (db, SOURCE_TIME_STAMP_KEY, &cursor);
477 }
478else if (rc == sOKAY)
479 {
480 TIME_STAMP_KEY_T key;
481
482 rc = rdm_cursorReadKey (cursor, AGGREGATE_TIME_STAMP_KEY, &key, sizeof (key), NULL);
483
484if (rc == sOKAY)
485 {
486 rc = rdm_dbGetRowsByKey (db, SOURCE_TIME_STAMP_KEY, &cursor);
487 }
488if (rc == sOKAY)
489 {
490 rc = rdm_cursorMoveToKey (cursor, SOURCE_TIME_STAMP_KEY, &key, sizeof (key));
491 }
492 }
493
494if (rc == sOKAY)
495 {
496 rc = rdm_cursorMoveToNext (cursor);
497 }
498
499while (rc == sOKAY)
500 {
501 SOURCE_RANGE_T source_range;
502 rc = rdm_cursorReadRow (cursor, &source_range, sizeof (source_range), NULL);
503if (rc == sOKAY)
504 {
505 rc = custom <NEXT>::put_range (&source_range);
506 }
507if (rc == sOKAY)
508 {
509 rc = rdm_cursorMoveToNext (cursor);
510 }
511 }
512if (rc == sENDOFCURSOR)
513 {
514 rc = sOKAY;
515 }
516
517rdm_cursorFree (cursor);
518 }
519
520if (rc == sOKAY)
521 {
522 restored_aggregate = true;
523 }
524 }
525
526if (rc == sOKAY)
527 {
528 rc = custom <NEXT>::put_range (psource_range);
529 }
530
531return rc;
532 }

References rdm_cursorFree(), rdm_cursorMoveToKey(), rdm_cursorMoveToLast(), rdm_cursorMoveToNext(), rdm_cursorReadKey(), rdm_cursorReadRow(), rdm_dbGetRowsByKey(), sENDOFCURSOR, and sOKAY.

Here is the call graph for this function:

put_stats()

template<class TIME_STAMP_KEY_T , RDM_KEY_ID SOURCE_TIME_STAMP_KEY, RDM_KEY_ID AGGREGATE_TIME_STAMP_KEY, class NEXT >
template<class SOURCE_STATS_T >
RDM_RETCODE RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >::put_stats ( SOURCE_STATS_T * psource_stats,
RDM::DB::TRANSACTIONAL_T = RDM::DB::NOT_TRANSACTIONAL
)
inline

Template method for receiving statistics.

Receive one statistic and process it accordingly.

The type for the value provided is required to have columns for 'time_stamp_first', 'time_stamp_last', 'n', 'value_sum', and 'value_sum2' with appropriate types. Such a type can be generated using rdm-compile with a schema including a table similar to this:

CREATE TABLE stats
(
time_stamp_first UINT64 NOT NULL,
time_stamp_last UINT64 PRIMARY KEY,
n UINT64 NOT NULL,
value_sum DOUBLE NOT NULL,
value_sum2 DOUBLE NOT NULL
);

This operation can be specified as being transactional. However, if the caller always rolls back the transaction in the case of a failure, there is no need to specify single operations to be transactional.

Template Parameters
SOURCE_STATS_T The actual type of the statistic received.
Return values
sOKAY Normal, successful return.
eNOSTARTUPDATE An update operation was attempted when no rdm_dbStartUpdate() is active.
eNOTLOCKED Attempt to access a table for reading or update without proper locks.
eCURSORDB Cursor is associated with a different database.
eDBNOTOPEN Database not open.
ePRECOMMITTED A precommitted transaction must be committed or rolled back before further operations on this database are allowed.
eDUPLICATE Attempt to insert a duplicate value as a unique/primary key.
eREADONLY Database is read-only and cannot be updated.
eREFINTEGRITY Integrity constraint violation.
eROWLIMIT Table row limit reached.
eINVARG Invalid argument.
Parameters
[in] psource_stats The source statistics sent to this class
347 {
348RDM_RETCODE rc = sOKAY;
349
350if (restored_aggregate == false)
351 {
352RDM_CURSOR cursor = NULL;
353 rc = rdm_dbGetRowsByKey (db, AGGREGATE_TIME_STAMP_KEY, &cursor);
354
355if (rc == sOKAY)
356 {
357 rc = rdm_cursorMoveToLast (cursor);
358if (rc == sENDOFCURSOR)
359 {
360 rc = rdm_dbGetRowsByKey (db, SOURCE_TIME_STAMP_KEY, &cursor);
361 }
362else if (rc == sOKAY)
363 {
364 TIME_STAMP_KEY_T key;
365
366 rc = rdm_cursorReadKey (cursor, AGGREGATE_TIME_STAMP_KEY, &key, sizeof (key), NULL);
367
368if (rc == sOKAY)
369 {
370 rc = rdm_dbGetRowsByKey (db, SOURCE_TIME_STAMP_KEY, &cursor);
371 }
372if (rc == sOKAY)
373 {
374 rc = rdm_cursorMoveToKey (cursor, SOURCE_TIME_STAMP_KEY, &key, sizeof (key));
375 }
376 }
377
378if (rc == sOKAY)
379 {
380 rc = rdm_cursorMoveToNext (cursor);
381 }
382
383while (rc == sOKAY)
384 {
385 SOURCE_STATS_T source_stats;
386 rc = rdm_cursorReadRow (cursor, &source_stats, sizeof (source_stats), NULL);
387if (rc == sOKAY)
388 {
389 rc = custom <NEXT>::put_stats (&source_stats);
390 }
391if (rc == sOKAY)
392 {
393 rc = rdm_cursorMoveToNext (cursor);
394 }
395 }
396if (rc == sENDOFCURSOR)
397 {
398 rc = sOKAY;
399 }
400
401rdm_cursorFree (cursor);
402 }
403
404if (rc == sOKAY)
405 {
406 restored_aggregate = true;
407 }
408 }
409
410if (rc == sOKAY)
411 {
412 rc = custom <NEXT>::put_stats (psource_stats);
413 }
414
415return rc;
416 }

References rdm_cursorFree(), rdm_cursorMoveToKey(), rdm_cursorMoveToLast(), rdm_cursorMoveToNext(), rdm_cursorReadKey(), rdm_cursorReadRow(), rdm_dbGetRowsByKey(), sENDOFCURSOR, and sOKAY.

Here is the call graph for this function:

put_value()

template<class TIME_STAMP_KEY_T , RDM_KEY_ID SOURCE_TIME_STAMP_KEY, RDM_KEY_ID AGGREGATE_TIME_STAMP_KEY, class NEXT >
template<class SOURCE_VALUE_T >
RDM_RETCODE RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >::put_value ( SOURCE_VALUE_T * psource_value,
RDM::DB::TRANSACTIONAL_T = RDM::DB::NOT_TRANSACTIONAL
)
inline

Template method for receiving a data value.

Receive one data value and process it accordingly.

The type for the value provided is required to have columns for 'time_stamp_current' and 'value_current' with appropriate types. Such a type can be generated using rdm-compile with a schema including a table similar to this:

CREATE TABLE measurement
(
time_stamp_current UINT64 PRIMARY KEY,
value_current DOUBLE NOT NULL
);

This operation can be specified as being transactional. However, if the caller always rolls back the transaction in the case of a failure, there is no need to specify single operations to be transactional.

Template Parameters
SOURCE_VALUE_T The actual type of the source values received
Return values
sOKAY Normal, successful return.
eNOSTARTUPDATE An update operation was attempted when no rdm_dbStartUpdate() is active.
eNOTLOCKED Attempt to access a table for reading or update without proper locks.
eCURSORDB Cursor is associated with a different database.
eDBNOTOPEN Database not open.
ePRECOMMITTED A precommitted transaction must be committed or rolled back before further operations on this database are allowed.
eDUPLICATE Attempt to insert a duplicate value as a unique/primary key.
eREADONLY Database is read-only and cannot be updated.
eREFINTEGRITY Integrity constraint violation.
eROWLIMIT Table row limit reached.
eINVARG Invalid argument.
Parameters
[in] psource_value The source value sent to this class
231 {
232RDM_RETCODE rc = sOKAY;
233
234if (restored_aggregate == false)
235 {
236RDM_CURSOR cursor = NULL;
237 rc = rdm_dbGetRowsByKey (db, AGGREGATE_TIME_STAMP_KEY, &cursor);
238
239if (rc == sOKAY)
240 {
241 rc = rdm_cursorMoveToLast (cursor);
242if (rc == sENDOFCURSOR)
243 {
244 rc = rdm_dbGetRowsByKey (db, SOURCE_TIME_STAMP_KEY, &cursor);
245 }
246else if (rc == sOKAY)
247 {
248 TIME_STAMP_KEY_T key;
249
250 rc = rdm_cursorReadKey (cursor, AGGREGATE_TIME_STAMP_KEY, &key, sizeof (key), NULL);
251
252if (rc == sOKAY)
253 {
254 rc = rdm_dbGetRowsByKey (db, SOURCE_TIME_STAMP_KEY, &cursor);
255 }
256if (rc == sOKAY)
257 {
258 rc = rdm_cursorMoveToKey (cursor, SOURCE_TIME_STAMP_KEY, &key, sizeof (key));
259 }
260 }
261
262if (rc == sOKAY)
263 {
264 rc = rdm_cursorMoveToNext (cursor);
265 }
266
267while (rc == sOKAY)
268 {
269 SOURCE_VALUE_T source_value;
270 rc = rdm_cursorReadRow (cursor, &source_value, sizeof (source_value), NULL);
271if (rc == sOKAY)
272 {
273 rc = custom <NEXT>::put_value (&source_value);
274 }
275if (rc == sOKAY)
276 {
277 rc = rdm_cursorMoveToNext (cursor);
278 }
279 }
280if (rc == sENDOFCURSOR)
281 {
282 rc = sOKAY;
283 }
284
285rdm_cursorFree (cursor);
286 }
287
288if (rc == sOKAY)
289 {
290 restored_aggregate = true;
291 }
292 }
293
294if (rc == sOKAY)
295 {
296 rc = custom <NEXT>::put_value (psource_value);
297 }
298
299return rc;
300 }

References rdm_cursorFree(), rdm_cursorMoveToKey(), rdm_cursorMoveToLast(), rdm_cursorMoveToNext(), rdm_cursorReadKey(), rdm_cursorReadRow(), rdm_dbGetRowsByKey(), sENDOFCURSOR, and sOKAY.

Here is the call graph for this function:

reset()

template<class TIME_STAMP_KEY_T , RDM_KEY_ID SOURCE_TIME_STAMP_KEY, RDM_KEY_ID AGGREGATE_TIME_STAMP_KEY, class NEXT >
void RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >::reset ( void )
inline

Reset this object.

Calling this method to discard all internally kept data values, ranges, and statistics that have not yet been persisted and start over from scratch.

Any alternative implementation of this method in a sub class would call this method to reset the next class.

184 {
186 restored_aggregate = false;
187 }

serialize()

template<class TIME_STAMP_KEY_T , RDM_KEY_ID SOURCE_TIME_STAMP_KEY, RDM_KEY_ID AGGREGATE_TIME_STAMP_KEY, class NEXT >
uint8_t* RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >::serialize ( uint8_t * buffer )
inline
132 {
133 memcpy (buffer, &restored_aggregate, sizeof (restored_aggregate));
134return custom <NEXT>::serialize (buffer + sizeof (restored_aggregate));
135 }

unserialize()

template<class TIME_STAMP_KEY_T , RDM_KEY_ID SOURCE_TIME_STAMP_KEY, RDM_KEY_ID AGGREGATE_TIME_STAMP_KEY, class NEXT >
uint8_t* RDM::TIME_SERIES::restore_aggregate< TIME_STAMP_KEY_T, SOURCE_TIME_STAMP_KEY, AGGREGATE_TIME_STAMP_KEY, NEXT >::unserialize ( uint8_t * buffer )
inline
144 {
145 memcpy (&restored_aggregate, buffer, sizeof (restored_aggregate));
146return custom <NEXT>::unserialize (buffer + sizeof (restored_aggregate));
147 }

The documentation for this class was generated from the following file:
RDM_RETCODE put_value(SOURCE_VALUE_T *source_value, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving a data value.
Definition: rdm_time_series_custom.h:360
RDM_RETCODE rdm_cursorMoveToNext(RDM_CURSOR cursor)
Position a cursor to the next row in the collection.
friend class stats
Definition: rdm_time_series_custom.h:63
@ sENDOFCURSOR
Definition: rdmretcodetypes.h:58
uint8_t * unserialize(uint8_t *buffer)
Definition: rdm_time_series_custom.h:169
struct RDM_CURSOR_S * RDM_CURSOR
Definition: rdmtypes.h:347
RDM_RETCODE rdm_cursorReadRow(RDM_CURSOR cursor, void *colValues, size_t bytesIn, size_t *bytesOut)
Read all columns from a row.
RDM_RETCODE rdm_dbGetRowsByKey(RDM_DB db, RDM_KEY_ID keyId, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with a row set based on a key.
@ sOKAY
Definition: rdmretcodetypes.h:100
uint8_t * serialize(uint8_t *buffer)
Definition: rdm_time_series_custom.h:158
RDM_RETCODE put_range(SOURCE_RANGE_T *source_range, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving ranges.
Definition: rdm_time_series_custom.h:466
RDM_RETCODE init(RDM_DB db)
Initialize this object.
Definition: rdm_time_series_custom.h:189
RDM_RETCODE rdm_cursorFree(RDM_CURSOR cursor)
Free an RDM_CURSOR.
RDM_RETCODE rdm_cursorReadKey(RDM_CURSOR cursor, RDM_KEY_ID keyId, void *keyValue, size_t bytesIn, size_t *bytesOut)
Read the columns for a key from a table row.
enum RDM_RETCODE_E RDM_RETCODE
RaimaDB status and error return codes.
RDM_RETCODE rdm_cursorMoveToKey(RDM_CURSOR cursor, RDM_KEY_ID keyId, const void *keyValue, size_t bytesIn)
Position a cursor based on a key value.
RDM_RETCODE rdm_cursorMoveToLast(RDM_CURSOR cursor)
Position a cursor to the last row in the collection.
void reset(void)
Reset this object.
Definition: rdm_time_series_custom.h:204
friend class split
Definition: rdm_time_series_custom.h:58
RDM_RETCODE put_stats(SOURCE_STATS_T *source_stats, RDM::DB::TRANSACTIONAL_T transactional=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving statistics.
Definition: rdm_time_series_custom.h:413