Nebula
Loading...
Searching...
No Matches
Db::Column Class Reference

#include <column.h>

Detailed Description

Describes a column in a database table.

Mainly a wrapper around attribute id, but contains additional data, like if the column should be indexed, or if it contains a primary key.

Public Types

enum  Type { Default , Primary , Indexed }
 column types More...
 

Public Member Functions

 Column ()
 default constructor
 
 Column (const Attr::AttrId &attrId, Type=Default)
 construct from attribute id
 
void SetAttrId (const Attr::AttrId &attrId)
 set attribute id (overrides name, fourcc, type and access mode)
 
const Attr::AttrIdGetAttrId () const
 get attribute id
 
const Util::StringGetName () const
 get column name
 
const Util::FourCCGetFourCC () const
 get column fourcc
 
Attr::ValueType GetValueType () const
 get column value type
 
Attr::AccessMode GetAccessMode () const
 get column access mode
 
void SetType (Type t)
 set column type
 
Type GetType () const
 get column type
 
void SetCommitted (bool b)
 set to true when the column is in-sync with the database
 
bool IsCommitted () const
 return true if the column has been sync'd with the database
 

Private Attributes

Attr::AttrId attrId
 
Type type
 
bool committed
 

Member Enumeration Documentation

◆ Type

column types

Enumerator
Default 
Primary 
Indexed 

Constructor & Destructor Documentation

◆ Column() [1/2]

Db::Column::Column ( )

default constructor

◆ Column() [2/2]

Db::Column::Column ( const Attr::AttrId & attrId,
Type t = Default )

construct from attribute id

Member Function Documentation

◆ GetAccessMode()

Attr::AccessMode Db::Column::GetAccessMode ( ) const
inline

get column access mode

◆ GetAttrId()

const Attr::AttrId & Db::Column::GetAttrId ( ) const
inline

get attribute id

◆ GetFourCC()

const Util::FourCC & Db::Column::GetFourCC ( ) const
inline

get column fourcc

◆ GetName()

const Util::String & Db::Column::GetName ( ) const
inline

get column name

◆ GetType()

Column::Type Db::Column::GetType ( ) const
inline

get column type

◆ GetValueType()

Attr::ValueType Db::Column::GetValueType ( ) const
inline

get column value type

◆ IsCommitted()

bool Db::Column::IsCommitted ( ) const
inline

return true if the column has been sync'd with the database

◆ SetAttrId()

void Db::Column::SetAttrId ( const Attr::AttrId & attrId)
inline

set attribute id (overrides name, fourcc, type and access mode)

◆ SetCommitted()

void Db::Column::SetCommitted ( bool b)
inline

set to true when the column is in-sync with the database

◆ SetType()

void Db::Column::SetType ( Type t)
inline

set column type

Member Data Documentation

◆ attrId

Attr::AttrId Db::Column::attrId
private

◆ committed

bool Db::Column::committed
private

◆ type

Type Db::Column::type
private

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