RDM::DB::QUERY::join_by_key< table_id, key_id, KEY_T, NEXT > Class Template Reference

Template base class for doing a join by key. More...

#include "rdm_db_query.h"

Inheritance diagram for RDM::DB::QUERY::join_by_key< table_id, key_id, KEY_T, NEXT >:
Inheritance graph
Collaboration diagram for RDM::DB::QUERY::join_by_key< table_id, key_id, KEY_T, NEXT >:
Collaboration graph

Public Member Functions

RDM_RETCODE bind_key (void *key_ref1, void *key_ref2=NULL, void *key_ref3=NULL, void *key_ref4=NULL, void *key_ref5=NULL, void *key_ref6=NULL, void *key_ref7=NULL, void *key_ref8=NULL, void *key_ref9=NULL, void *key_ref10=NULL)
Bind a key. More...
- Public Member Functions inherited from RDM::DB::QUERY::join_rows< table_id, NEXT >
join_rows ()
~join_rows ()
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...
RDM_RETCODE init (RDM_DB db)
Initialize this object. More...
void reset (void)
Reset this object. More...
RDM_RETCODE fetch_first ()
Fetch the first. More...
RDM_RETCODE fetch_prev ()
Fetch the previous. More...
RDM_RETCODE fetch_next ()
Fetch the next. More...
RDM_RETCODE fetch_last ()
Fetch the last. More...
template<class TARGET_ROW_T >
RDM_RETCODE bind_row (TARGET_ROW_T *target_row, bool *target_all_columns_null=NULL)
Bind a row. More...

Protected Member Functions

join_by_key ()

Additional Inherited Members

- Static Public Member Functions inherited from RDM::DB::QUERY::join_rows< table_id, 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...
- Data Fields inherited from RDM::DB::QUERY::join_rows< table_id, NEXT >
NEXT next
- Protected Attributes inherited from RDM::DB::QUERY::join_rows< table_id, NEXT >
RDM_DB db
RDM_CURSOR cursor
void * target_row
uint32_t target_size
bool * target_all_columns_null
bool outer_join
position pos

Detailed Description

template<RDM_TABLE_ID table_id, RDM_KEY_ID key_id, class KEY_T, class NEXT>
class RDM::DB::QUERY::join_by_key< table_id, key_id, KEY_T, NEXT >

Template base class for doing a join by key.

Don't instantiate this template class directly. Instead, instantiate one of the derived classes inner_join_by_key or outer_join_by_key.

Template Parameters
table_id The ID of the table we join with. This is one argument of the join.
key_id The ID of the key we key on
KEY_T The class type for the key
NEXT The next class in the chain of classes. This represents one arguments of the join.

Constructor & Destructor Documentation

join_by_key()

template<RDM_TABLE_ID table_id, RDM_KEY_ID key_id, class KEY_T , class NEXT >
RDM::DB::QUERY::join_by_key< table_id, key_id, KEY_T, NEXT >::join_by_key ( )
inlineprotected
587 {}

Member Function Documentation

bind_key()

template<RDM_TABLE_ID table_id, RDM_KEY_ID key_id, class KEY_T , class NEXT >
RDM_RETCODE RDM::DB::QUERY::join_by_key< table_id, key_id, KEY_T, NEXT >::bind_key ( void * key_ref1,
void * key_ref2 = NULL,
void * key_ref3 = NULL,
void * key_ref4 = NULL,
void * key_ref5 = NULL,
void * key_ref6 = NULL,
void * key_ref7 = NULL,
void * key_ref8 = NULL,
void * key_ref9 = NULL,
void * key_ref10 = NULL
)
inline

Bind a key.

Bind a key to key values with corresponding "has_value" wherer applicable. The values can be set to a static value or a value for column of a row (set up using join_rows::bind_row()) for one of the previous classes in the chain.

Parameters
[in] key_ref1 A reference to the 1st key/has value
[in] key_ref2 A reference to the 2nd key/has value. NULL if there is no reference.
[in] key_ref3 A reference to the 3rd key/has value. NULL if there is no reference.
[in] key_ref4 A reference to the 4th key/has value. NULL if there is no reference.
[in] key_ref5 A reference to the 5th key/has value. NULL if there is no reference.
[in] key_ref6 A reference to the 6th key/has value. NULL if there is no reference.
[in] key_ref7 A reference to the 7th key/has value. NULL if there is no reference.
[in] key_ref8 A reference to the 8th key/has value. NULL if there is no reference.
[in] key_ref9 A reference to the 9th key/has value. NULL if there is no reference.
[in] key_ref10 A reference to the 10th key/has value. NULL if there is no reference.
610 {
611 this->key_ref1 = key_ref1;
612 this->key_ref2 = key_ref2;
613 this->key_ref3 = key_ref3;
614 this->key_ref4 = key_ref4;
615 this->key_ref5 = key_ref5;
616 this->key_ref6 = key_ref6;
617 this->key_ref7 = key_ref7;
618 this->key_ref8 = key_ref8;
619 this->key_ref9 = key_ref9;
620 this->key_ref10 = key_ref10;
621
622return sOKAY;
623 }

References sOKAY.


The documentation for this class was generated from the following file:
@ sOKAY
Definition: rdmretcodetypes.h:96