MyMoneyDbColumn Class Reference

#include <mymoneystoragesql.h>

Inheritance diagram for MyMoneyDbColumn:

KShared MyMoneyDbDatetimeColumn MyMoneyDbIntColumn MyMoneyDbTextColumn
Collaboration diagram for MyMoneyDbColumn:

Collaboration graph

List of all members.

Public Member Functions

 MyMoneyDbColumn (const QString &iname, const QString &itype=QString::null, const bool iprimary=false, const bool inotnull=false, const QString &initVersion="0.1")
 MyMoneyDbColumn (void)
virtual ~MyMoneyDbColumn ()
virtual MyMoneyDbColumnclone () const
virtual const QString generateDDL (databaseTypeE dbType) const
const QString & name (void) const
const QString & type (void) const
bool isPrimaryKey (void) const
bool isNotNull (void) const

Private Attributes

QString m_name
QString m_type
bool m_isPrimary
bool m_isNotNull
QString m_initVersion

Detailed Description

The MyMoneyDbColumn class is a base type for generic db columns. Derived types exist for several common column types.

Constructor & Destructor Documentation

MyMoneyDbColumn::MyMoneyDbColumn ( const QString &  iname,
const QString &  itype = QString::null,
const bool  iprimary = false,
const bool  inotnull = false,
const QString &  initVersion = "0.1" 
) [inline]

MyMoneyDbColumn::MyMoneyDbColumn ( void   )  [inline]

virtual MyMoneyDbColumn::~MyMoneyDbColumn (  )  [inline, virtual]

Member Function Documentation

virtual MyMoneyDbColumn* MyMoneyDbColumn::clone (  )  const [virtual]

This method is used to copy column objects. Because there are several derived types, clone() is more appropriate than a copy ctor in most cases.

Reimplemented in MyMoneyDbDatetimeColumn, MyMoneyDbIntColumn, and MyMoneyDbTextColumn.

virtual const QString MyMoneyDbColumn::generateDDL ( databaseTypeE  dbType  )  const [virtual]

This method generates the DDL (Database Design Language) string for the column.

dbType Database driver type
QString of the DDL for the column, tailored for what the driver supports.

Reimplemented in MyMoneyDbDatetimeColumn, MyMoneyDbIntColumn, and MyMoneyDbTextColumn.

const QString& MyMoneyDbColumn::name ( void   )  const [inline]

const QString& MyMoneyDbColumn::type ( void   )  const [inline]

bool MyMoneyDbColumn::isPrimaryKey ( void   )  const [inline]

bool MyMoneyDbColumn::isNotNull ( void   )  const [inline]

Member Data Documentation

QString MyMoneyDbColumn::m_name [private]

QString MyMoneyDbColumn::m_type [private]

Reimplemented in MyMoneyDbIntColumn, and MyMoneyDbTextColumn.

QString MyMoneyDbColumn::m_initVersion [private]

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

Generated on Wed Jan 26 13:09:12 2011 for KMyMoney by  doxygen 1.5.6