Template Class for inserting a row. More...
#include "rdm_db_insert_row.h"
|
template<class ANY_NEXT > |
class |
RDM::DB::transaction
|
|
template<class ANY_NEXT_1 , class ANY_NEXT_2 > |
class |
RDM::TIME_SERIES::split
|
|
template<uint32_t ANY_N, class ANY_RANGE_T , class ANY_NEXT > |
class |
RDM::TIME_SERIES::collect
|
|
template<uint32_t ANY_N, class ANY_RANGE_T , class ANY_INDATA_T , class ANY_NEXT > |
class |
RDM::TIME_SERIES::fft
|
|
template<uint32_t ANY_N, class ANY_AGGREGATE_T , class ANY_AGG_ELEMENT_T , class ANY_NEXT > |
class |
RDM::TIME_SERIES::mean
|
|
template<class ANY_RATIO , class ANY_NEXT > |
class |
RDM::TIME_SERIES::scale
|
|
template<uint32_t ANY_N, class ANY_STATS_T , class ANY_NEXT > |
class |
RDM::TIME_SERIES::stats
|
|
template<uint32_t ANY_N, class ANY_NEXT > |
class |
RDM::TIME_SERIES::downsample
|
|
template<class ANY_NEXT > |
class |
RDM::TIME_SERIES::custom
|
|
template<RDM_TABLE_ID table_id>
class RDM::DB::insert_row< table_id >
Template Class for inserting a row.
Template class for inserting data values, ranges, or statistics into a table. What is received will be inserted into the specified table.
- Template Parameters
-
table_id |
The ID of the table to insert the received data values, ranges, or statistics into. |
- Examples
- cpp70Example_main.cpp, time_series_fft.cpp, time_series_range.cpp, time_series_restore_aggregate.cpp, and time_series_stats.cpp.
flush_range()
template<RDM_TABLE_ID table_id>
Flush this object.
Calling this method does not do anything here.
- Return values
-
sOKAY |
Normal, successful return. |
- Parameters
-
threshold |
[IN] Only flush objects where at least this many elements have been collected |
transactional |
[IN] Is the flush required to be transactional |
References sOKAY.
flush_stats()
template<RDM_TABLE_ID table_id>
Flush this object.
Calling this method does not do anything here.
- Return values
-
sOKAY |
Normal, successful return. |
References sOKAY.
flush_value()
template<RDM_TABLE_ID table_id>
Flush this object.
Calling this method does not do anything here.
- Return values
-
sOKAY |
Normal, successful return. |
References sOKAY.
get_serialize_size()
template<RDM_TABLE_ID table_id>
|
inlinestaticconstexprprotected
|
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.
init()
template<RDM_TABLE_ID table_id>
Initialize this object.
Calling this method before sending it any data values, ranges, or statistics.
- Return values
-
sOKAY |
Normal, successful return. |
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 inserting the received data values, ranges, or statistics. |
- Examples
- time_series_fft.cpp, time_series_range.cpp, and time_series_restore_aggregate.cpp.
References RDM::DB::insert_row< table_id >::db, and sOKAY.
init_tables_to_read_lock()
template<RDM_TABLE_ID table_id>
IDs of the tables where rows are read.
Use this method to initialize an array of table IDs. This array can then be used to start a transaction where those tables are specified.
init_tables_to_write_lock()
template<RDM_TABLE_ID table_id>
IDs of the tables where rows are inserted.
Use this method to initialize an array of table IDs. This array can then be used to start a transaction where those tables are specified.
number_of_tables_to_read_lock()
template<RDM_TABLE_ID table_id>
|
inlinestaticconstexprprotected
|
Number of tables where rows are read.
Constant expression method used to statically calculate the size of the array needed for table locking.
number_of_tables_to_write_lock()
template<RDM_TABLE_ID table_id>
|
inlinestaticconstexprprotected
|
Number of tables where rows are inserted.
Constant expression method used to statically calculate the size of the array needed for table locking.
put_range()
template<RDM_TABLE_ID table_id>
template<class SOURCE_RANGE_T >
Template method for receiving ranges.
Receive one range and insert it into the database.
- 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] |
source_range |
The source range sent to this class |
|
transactional |
[IN] Is the put required to be transactional |
291return put_value (source_range, transactional);
References RDM::DB::insert_row< table_id >::put_value().
put_stats()
template<RDM_TABLE_ID table_id>
template<class SOURCE_STATS_T >
Template method for receiving statistics.
Receive one statistic and insert it into the database.
- 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] |
source_stats |
The source statistics sent to this class |
|
transactional |
[IN] Is the put required to be transactional |
265return put_value (source_stats, transactional);
References RDM::DB::insert_row< table_id >::put_value().
put_value()
template<RDM_TABLE_ID table_id>
template<class SOURCE_VALUE_T >
Template method for receiving a data value.
Receive one data value and insert it into the database.
- 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] |
source_value |
The source value sent to this class |
236db, table_id, source_value,
237sizeof (*source_value), NULL);
References RDM::DB::insert_row< table_id >::db, and rdm_dbInsertRow().
Referenced by RDM::DB::insert_row< table_id >::put_range(), and RDM::DB::insert_row< table_id >::put_stats().
reset()
template<RDM_TABLE_ID table_id>
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.
serialize()
template<RDM_TABLE_ID table_id>
unflush()
template<RDM_TABLE_ID table_id>
Undo a previous flush operation.
unput()
template<RDM_TABLE_ID table_id>
Undo a previous put operation.
unserialize()
template<RDM_TABLE_ID table_id>
RDM::DB::transaction
template<RDM_TABLE_ID table_id>
template<class ANY_NEXT >
RDM::TIME_SERIES::collect
template<RDM_TABLE_ID table_id>
template<uint32_t ANY_N, class ANY_RANGE_T , class ANY_NEXT >
RDM::TIME_SERIES::custom
template<RDM_TABLE_ID table_id>
template<class ANY_NEXT >
RDM::TIME_SERIES::downsample
template<RDM_TABLE_ID table_id>
template<uint32_t ANY_N, class ANY_NEXT >
RDM::TIME_SERIES::fft
template<RDM_TABLE_ID table_id>
template<uint32_t ANY_N, class ANY_RANGE_T , class ANY_INDATA_T , class ANY_NEXT >
RDM::TIME_SERIES::mean
template<RDM_TABLE_ID table_id>
template<uint32_t ANY_N, class ANY_AGGREGATE_T , class ANY_AGG_ELEMENT_T , class ANY_NEXT >
RDM::TIME_SERIES::scale
template<RDM_TABLE_ID table_id>
template<class ANY_RATIO , class ANY_NEXT >
RDM::TIME_SERIES::split
template<RDM_TABLE_ID table_id>
template<class ANY_NEXT_1 , class ANY_NEXT_2 >
RDM::TIME_SERIES::stats
template<RDM_TABLE_ID table_id>
template<uint32_t ANY_N, class ANY_STATS_T , class ANY_NEXT >
db
template<RDM_TABLE_ID table_id>
The documentation for this class was generated from the following files:
RDM_DB db
Definition: rdm_db_insert_row.h:41
@ sOKAY
Definition: rdmretcodetypes.h:100
enum RDM_RETCODE_E RDM_RETCODE
RaimaDB status and error return codes.
RDM_RETCODE rdm_dbInsertRow(RDM_DB db, RDM_TABLE_ID tableId, const void *colValues, size_t bytesIn, RDM_CURSOR *pCursor)
Insert a new row into a table at the specified rowId.
RDM_RETCODE put_value(SOURCE_VALUE_T *source_value, RDM::DB::TRANSACTIONAL_T=RDM::DB::NOT_TRANSACTIONAL)
Template method for receiving a data value.
Definition: rdm_db_insert_row.h:231