Kexi API Documentation (2.0 alpha)

KexiDB::OrderByColumnList Class Reference

#include <queryschema.h>

Inheritance diagram for KexiDB::OrderByColumnList:

OrderByColumnListBase List of all members.

Detailed Description

KexiDB::OrderByColumnList provides list of sorted columns for a query schema.

Definition at line 156 of file queryschema.h.

Public Member Functions

 OrderByColumnList ()
 ~OrderByColumnList ()
bool appendFields (QuerySchema &querySchema, const QString &field1, bool ascending1=true, const QString &field2=QString::null, bool ascending2=true, const QString &field3=QString::null, bool ascending3=true, const QString &field4=QString::null, bool ascending4=true, const QString &field5=QString::null, bool ascending5=true)
void appendColumn (QueryColumnInfo &columnInfo, bool ascending=true)
void appendField (Field &field, bool ascending=true)
bool appendField (QuerySchema &querySchema, const QString &fieldName, bool ascending=true)
bool appendColumn (QuerySchema &querySchema, bool ascending=true, int pos=-1)
void appendColumn (const OrderByColumn &column)
bool isEmpty () const
uint count () const
void clear ()
const_iterator constBegin () const
const_iterator constEnd () const
QString debugString () const
QString toSQLString (bool includeTableNames=true) const


Constructor & Destructor Documentation

OrderByColumnList::OrderByColumnList  ) 
 

Constructs empty list of ordered columns.

Definition at line 393 of file queryschema.cpp.

OrderByColumnList::~OrderByColumnList  ) 
 

Definition at line 427 of file queryschema.cpp.


Member Function Documentation

void OrderByColumnList::appendColumn const OrderByColumn column  ) 
 

Appends column to the list.

Definition at line 469 of file queryschema.cpp.

bool OrderByColumnList::appendColumn QuerySchema querySchema,
bool  ascending = true,
int  pos = -1
 

Appends a column that is at position pos (counted from 0).

Returns:
true on successful adding and false if there is no such position pos.

Definition at line 436 of file queryschema.cpp.

References appendColumn(), and KexiDB::QuerySchema::fieldsExpanded().

void OrderByColumnList::appendColumn QueryColumnInfo columnInfo,
bool  ascending = true
 

Appends column columnInfo. Ascending sorting is set is ascending is true.

Definition at line 431 of file queryschema.cpp.

Referenced by appendColumn(), appendField(), KexiQueryDesignerGuiEditor::buildSchema(), and buildSelectQuery().

bool OrderByColumnList::appendField QuerySchema querySchema,
const QString fieldName,
bool  ascending = true
 

Appends field with a name field. Ascending sorting is set is ascending is true.

Returns:
true on successful appending, and false if there is no such field or alias name in the querySchema.

Definition at line 451 of file queryschema.cpp.

References appendColumn(), KexiDB::QuerySchema::columnInfo(), field, KexiDB::QuerySchema::findTableField(), and KexiDBWarn.

void OrderByColumnList::appendField Field field,
bool  ascending = true
 

Appends a field field. Ascending sorting is set is ascending is true. Read documentation of OrderByColumn(const Field& field, bool ascending = true) for more info.

Definition at line 446 of file queryschema.cpp.

References appendColumn().

Referenced by KexiQueryDesignerGuiEditor::buildSchema(), and buildSelectQuery().

bool OrderByColumnList::appendFields QuerySchema querySchema,
const QString field1,
bool  ascending1 = true,
const QString field2 = QString::null,
bool  ascending2 = true,
const QString field3 = QString::null,
bool  ascending3 = true,
const QString field4 = QString::null,
bool  ascending4 = true,
const QString field5 = QString::null,
bool  ascending5 = true
 

Appends multiple fields for sorting. querySchema is used to find appropriate field or alias name.

Returns:
false if there is at least one name for which a field or alias name does not exist (all the newly appended fields are removed in this case)

Definition at line 398 of file queryschema.cpp.

References ADD_COL.

void KexiDB::OrderByColumnList::clear  )  [inline]
 

Removes all elements from the list.

Definition at line 203 of file queryschema.h.

const_iterator KexiDB::OrderByColumnList::constBegin  )  const [inline]
 

Definition at line 205 of file queryschema.h.

Referenced by debugString(), KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(), and toSQLString().

const_iterator KexiDB::OrderByColumnList::constEnd  )  const [inline]
 

Definition at line 206 of file queryschema.h.

Referenced by debugString(), KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(), and toSQLString().

uint KexiDB::OrderByColumnList::count  )  const [inline]
 

Returns:
number of elements of the list.

Definition at line 200 of file queryschema.h.

QString OrderByColumnList::debugString  )  const
 

Returns:
string for debugging purposes.

Definition at line 474 of file queryschema.cpp.

References constBegin(), constEnd(), and isEmpty().

bool KexiDB::OrderByColumnList::isEmpty  )  const [inline]
 

Returns:
true if the list is empty.

Definition at line 197 of file queryschema.h.

Referenced by debugString().

QString OrderByColumnList::toSQLString bool  includeTableNames = true  )  const
 

Returns:
a string like "name ASC, 2 DESC" usable for building a SQL statement. If includeTableNames is true (the default) fields are output in a form of "tablename.fieldname".

Definition at line 487 of file queryschema.cpp.

References constBegin(), and constEnd().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:47 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003