CONZEPT 16 C++ API
C16::RecordsLink Class Reference

Record set of records restricted and ordered by a link. More...

#include "C16/RecordsLink.hpp"

Inheritance diagram for C16::RecordsLink:
C16::Records

Detailed Description

Record set of records restricted and ordered by a link.

Public Member Functions

 RecordsLink (const Link &link, bool reverse=false)
 Constructs a record set by means of a link. More...
 
 RecordsLink (const Table &table_source, int link_number, bool reverse=false)
 Constructs a record set by means of a source table and the number of a link. More...
 
 RecordsLink (const Database &database, const std::string &link_name, bool reverse=false)
 Constructs a record set by means of a database and the name of a link. More...
 
 RecordsLink (const Database &database, const std::string &table_name_source, int link_number, bool reverse=false)
 Constructs a record set by means of a database, the name of source table and the number of a link. More...
 
 RecordsLink (const Database &database, int table_number_source, int link_number, bool reverse=false)
 Constructs a record set by means of a database, the number of a source table and the number of a link. More...
 
long int count () const override
 Gets the count of records of the record set. More...
 
const Linklink () const
 Gets the link of the record set. More...
 
const Recordrecord_source () const
 Gets the source record buffer of the record set. More...
 
Recordrecord_source ()
 Gets the source record buffer of the record set. More...
 
- Public Member Functions inherited from C16::Records
const Tabletable () const
 Gets the table of the record set. More...
 
const Recordrecord () const
 Gets the record buffer of the record set. More...
 
Recordrecord ()
 Gets the record buffer of the record set. More...
 
bool reverse () const
 Gets if the order of the records is reverted. More...
 
void reverse_set (bool reverse)
 Sets if the order of the records is reverted. More...
 
Result read (Place place, Locking locking=Locking::NONE, bool reverse=false)
 Reads a record by means of a place into the record buffer. More...
 
Result read (long int position, Locking locking=Locking::NONE, bool reverse=false)
 Reads a record by means of its position into the record buffer. More...
 

Constructor & Destructor Documentation

◆ RecordsLink() [1/5]

C16::RecordsLink::RecordsLink ( const Link link,
bool  reverse = false 
)
explicit

Constructs a record set by means of a link.

Parameters
linkLink
reverseOption to use the destination key of the link in reverse order

◆ RecordsLink() [2/5]

C16::RecordsLink::RecordsLink ( const Table table_source,
int  link_number,
bool  reverse = false 
)

Constructs a record set by means of a source table and the number of a link.

Parameters
table_sourceSource table
link_numberNumber of the link
reverseOption to use the destination key of the link in reverse order
Exceptions
Exception::InexistenceLink inexistent.

◆ RecordsLink() [3/5]

C16::RecordsLink::RecordsLink ( const Database database,
const std::string &  link_name,
bool  reverse = false 
)

Constructs a record set by means of a database and the name of a link.

Parameters
databaseDatabase
link_nameName of the link
reverseOption to use the destination key of the link in reverse order
Exceptions
Exception::InexistenceLink inexistent.

◆ RecordsLink() [4/5]

C16::RecordsLink::RecordsLink ( const Database database,
const std::string &  table_name_source,
int  link_number,
bool  reverse = false 
)

Constructs a record set by means of a database, the name of source table and the number of a link.

Parameters
databaseDatabase
table_name_sourceName of the source table
link_numberNumber of the link link
reverseOption to use the destination key of the link in reverse order
Exceptions
Exception::InexistenceTable inexistent.
Exception::InexistenceLink inexistent.

◆ RecordsLink() [5/5]

C16::RecordsLink::RecordsLink ( const Database database,
int  table_number_source,
int  link_number,
bool  reverse = false 
)

Constructs a record set by means of a database, the number of a source table and the number of a link.

Parameters
databaseDatabase
table_number_sourceNumber of the source table
link_numberNumber of the link
reverseOption to use the destination key of the link in reverse order
Exceptions
Exception::InexistenceTable inexistent.
Exception::InexistenceLink inexistent.

Member Function Documentation

◆ count()

long int C16::RecordsLink::count ( ) const
overridevirtual

Gets the count of records of the record set.

Implements C16::Records.

◆ link()

const Link& C16::RecordsLink::link ( ) const

Gets the link of the record set.

◆ record_source() [1/2]

const Record& C16::RecordsLink::record_source ( ) const

Gets the source record buffer of the record set.

◆ record_source() [2/2]

Record& C16::RecordsLink::record_source ( )

Gets the source record buffer of the record set.