CompleteDB Embedded: Direct C++ API  2.4.2
Record Class Reference

Record is statement class that provides active record pattern services. It is used to insert, select, update, delete and iterate rows in a database table. More...

#include <Record.hpp>

+ Inheritance diagram for Record:

Public Member Functions

bool cast (const Object &from)
bool isConnected () const
bool isDisconnected () const
Type::Enum getClassType () const
Type::Enum getObjectType () const
ColumnBool getColumnBool (const char *name)
ColumnDouble getColumnDouble (const char *name)
ColumnFloat getColumnFloat (const char *name)
ColumnInt16 getColumnInt16 (const char *name)
ColumnInt32 getColumnInt32 (const char *name)
ColumnInt64 getColumnInt64 (const char *name)
ColumnInt8 getColumnInt8 (const char *name)
ColumnString getColumnString (const char *name)
Error::Enum getLastErrorId () const
const char * getLastError () const
bool prepare ()
bool commitRow ()
bool commitRow (DirectId &directId)
bool copyBuffer ()
bool deleteDirect (const DirectId &directId)
bool deleteRow ()
bool deleteSurrogate (const SurrogateId &surrogateId)
bool getDirectId (DirectId &directId)
bool getSurrogateId (SurrogateId &surrogateId)
bool holdDirect (const DirectId &directId)
bool holdRow ()
bool holdSurrogate (const SurrogateId &surrogateId)
bool insertSurrogate (const SurrogateId &surrogateId)
bool loadDirect (const DirectId &directId)
bool loadDirectOutside (const DirectId &directId)
bool loadRow ()
bool loadRowOutside ()
bool loadSurrogate (const SurrogateId &surrogateId)
bool loadSurrogateOutside (const SurrogateId &surrogateId)
bool nextRow ()
bool nextRowOutside ()
bool resetRowIterator ()
bool rollbackRow ()
uint32_t getBufferSize () const
Recordoperator= (const Record &src)
 Record (const Record &src)
virtual ~Record ()
 Record ()
- Public Member Functions inherited from Object
void * get () const
Objectoperator= (const Object &src)
 Object (const Object &src)
virtual ~Object ()
 Object ()
- Public Member Functions inherited from Columns
Columnsoperator= (const Columns &src)
 Columns (const Columns &src)
virtual ~Columns ()
 Columns ()
- Public Member Functions inherited from FastStatement
FastStatementoperator= (const FastStatement &src)
 FastStatement (const FastStatement &src)
virtual ~FastStatement ()
 FastStatement ()

Friends

class Database
class Table
class TableDml

Additional Inherited Members

- Protected Member Functions inherited from Object
 Object (void *src)
- Protected Attributes inherited from Object
void * m

Detailed Description

Record is statement class that provides active record pattern services. It is used to insert, select, update, delete and iterate rows in a database table.

Definition at line 17 of file Record.hpp.

Constructor & Destructor Documentation

Record ( const Record src)
inline

Definition at line 192 of file Record.hpp.

virtual ~Record ( )
inlinevirtual

Definition at line 196 of file Record.hpp.

Record ( )
inline

Definition at line 197 of file Record.hpp.

Member Function Documentation

bool cast ( const Object from)
inlinevirtual

Performs safe typecast.

Reimplemented from Columns.

Definition at line 32 of file Record.hpp.

bool commitRow ( )
inline

Commits the database transaction for current row only.

Definition at line 108 of file Record.hpp.

bool commitRow ( DirectId directId)
inline

Definition at line 109 of file Record.hpp.

bool copyBuffer ( )
inline

Definition at line 110 of file Record.hpp.

bool deleteDirect ( const DirectId directId)
inline

Deletes a row by DirectId.

Definition at line 114 of file Record.hpp.

bool deleteRow ( )
inline

Deletes current row.

Definition at line 118 of file Record.hpp.

bool deleteSurrogate ( const SurrogateId surrogateId)
inline

Deletes a row by SurrogateId.

Definition at line 122 of file Record.hpp.

uint32_t getBufferSize ( ) const
inline

Definition at line 187 of file Record.hpp.

Type::Enum getClassType ( ) const
inlinevirtual

class type of the object.

Reimplemented from Columns.

Definition at line 44 of file Record.hpp.

ColumnBool getColumnBool ( const char *  name)
inlinevirtual

Retrieves existing Bool column.

Reimplemented from Columns.

Definition at line 55 of file Record.hpp.

ColumnDouble getColumnDouble ( const char *  name)
inlinevirtual

Retrieves existing Double column.

Reimplemented from Columns.

Definition at line 59 of file Record.hpp.

ColumnFloat getColumnFloat ( const char *  name)
inlinevirtual

Retrieves existing Float column.

Reimplemented from Columns.

Definition at line 63 of file Record.hpp.

ColumnInt16 getColumnInt16 ( const char *  name)
inlinevirtual

Retrieves existing Int16 column.

Reimplemented from Columns.

Definition at line 67 of file Record.hpp.

ColumnInt32 getColumnInt32 ( const char *  name)
inlinevirtual

Retrieves existing Int32 column.

Reimplemented from Columns.

Definition at line 71 of file Record.hpp.

ColumnInt64 getColumnInt64 ( const char *  name)
inlinevirtual

Retrieves existing Int64 column.

Reimplemented from Columns.

Definition at line 75 of file Record.hpp.

ColumnInt8 getColumnInt8 ( const char *  name)
inlinevirtual

Retrieves existing Int8 column.

Reimplemented from Columns.

Definition at line 79 of file Record.hpp.

ColumnString getColumnString ( const char *  name)
inlinevirtual

Retrieves existing String column.

Reimplemented from Columns.

Definition at line 83 of file Record.hpp.

bool getDirectId ( DirectId directId)
inline

Gets DirectId of the current row.

Definition at line 126 of file Record.hpp.

const char* getLastError ( ) const
inlinevirtual

Retrieves the calling object last-error text message.

Reimplemented from FastStatement.

Definition at line 94 of file Record.hpp.

Error::Enum getLastErrorId ( ) const
inlinevirtual

Retrieves the calling object last-error id value.

Reimplemented from FastStatement.

Definition at line 90 of file Record.hpp.

Type::Enum getObjectType ( ) const
inlinevirtual

object type of the underlying derived object.

Reimplemented from Columns.

Definition at line 48 of file Record.hpp.

bool getSurrogateId ( SurrogateId surrogateId)
inline

Gets SurrogateId of the current row if exists.

Definition at line 130 of file Record.hpp.

bool holdDirect ( const DirectId directId)
inline

Holds a row by DirectId for update operation.

Definition at line 134 of file Record.hpp.

bool holdRow ( )
inline

Holds current row for update operation.

Definition at line 138 of file Record.hpp.

bool holdSurrogate ( const SurrogateId surrogateId)
inline

Holds a row by SurrogateId for update operation.

Definition at line 142 of file Record.hpp.

bool insertSurrogate ( const SurrogateId surrogateId)
inline

Inserts new row in a table with user supplied surrogateId.

Definition at line 146 of file Record.hpp.

bool isConnected ( ) const
inlinevirtual

if underlying database is connected.

Reimplemented from Columns.

Definition at line 36 of file Record.hpp.

bool isDisconnected ( ) const
inlinevirtual

if underlying database is not connected.

Reimplemented from Columns.

Definition at line 40 of file Record.hpp.

bool loadDirect ( const DirectId directId)
inline

Loads a row from a table by DirectId.

Definition at line 150 of file Record.hpp.

bool loadDirectOutside ( const DirectId directId)
inline

Loads a row from a table by DirectId outside of the current transaction.

Definition at line 154 of file Record.hpp.

bool loadRow ( )
inline

Reloads current row.

Definition at line 158 of file Record.hpp.

bool loadRowOutside ( )
inline

Reloads current row outside of the current transaction.

Definition at line 162 of file Record.hpp.

bool loadSurrogate ( const SurrogateId surrogateId)
inline

Loads a row from a table by SurrogateId.

Definition at line 166 of file Record.hpp.

bool loadSurrogateOutside ( const SurrogateId surrogateId)
inline

Loads a row from a table by SurrogateId outside of the current transaction.

Definition at line 170 of file Record.hpp.

bool nextRow ( )
inline

Advances the row iterator to the next row element.

Definition at line 174 of file Record.hpp.

bool nextRowOutside ( )
inline

Advances the row iterator to the next row element outside of the current transaction.

Definition at line 178 of file Record.hpp.

Record& operator= ( const Record src)
inline

Definition at line 191 of file Record.hpp.

bool prepare ( )
inlinevirtual

Validates and prepares statement for execution.

Reimplemented from FastStatement.

Definition at line 101 of file Record.hpp.

bool resetRowIterator ( )
inline

Sets the row iterator to its initial position.

Definition at line 182 of file Record.hpp.

bool rollbackRow ( )
inline

Rolls back a transaction from a pending state for current row only.

Definition at line 186 of file Record.hpp.

Friends And Related Function Documentation

friend class Database
friend

Definition at line 23 of file Record.hpp.

friend class Table
friend

Definition at line 24 of file Record.hpp.

friend class TableDml
friend

Definition at line 25 of file Record.hpp.


The documentation for this class was generated from the following file: