TQSqlIndex(3qt)

NAME
TQSqlIndex - Functions to manipulate and describe TQSqlCursor and TQSqlDatabase indexes

SYNOPSIS
#include <tqsqlindex.h>

Inherits TQSqlRecord.

  Public Members
TQSqlIndex ( const TQString & cursorname = TQString::null, const TQString & name = TQString::null )
TQSqlIndex ( const TQSqlIndex & other )
~TQSqlIndex ()
TQSqlIndex & operator= ( const TQSqlIndex & other )
virtual void setCursorName ( const TQString & cursorName )
TQString cursorName () const
virtual void setName ( const TQString & name )
TQString name () const
virtual void append ( const TQSqlField & field )
virtual void append ( const TQSqlField & field, bool desc )
bool isDescending ( int i ) const
virtual void setDescending ( int i, bool desc )

  Static Public Members
TQSqlIndex fromStringList ( const TQStringList & l, const TQSqlCursor * cursor )

DESCRIPTION
The TQSqlIndex class provides functions to manipulate and describe TQSqlCursor and TQSqlDatabase indexes.

This class is used to describe and manipulate TQSqlCursor and TQSqlDatabase indexes. An index refers to a single table or view in a database. Information about the fields that comprise the index can be used to generate SQL statements, or to affect the behavior of a TQSqlCursor object.

Normally, TQSqlIndex objects are created by TQSqlDatabase or TQSqlCursor.

See also Database Classes.

MEMBER FUNCTION DOCUMENTATION

TQSqlIndex::TQSqlIndex ( const TQString & cursorname = TQString::null, const TQString & name = TQString::null )
Constructs an empty index using the cursor name cursorname and index name name.

TQSqlIndex::TQSqlIndex ( const TQSqlIndex & other )
Constructs a copy of other.

TQSqlIndex::~TQSqlIndex ()
Destroys the object and frees any allocated resources.

void TQSqlIndex::append ( const TQSqlField & field ) [virtual]
Appends the field field to the list of indexed fields. The field is appended with an ascending sort order.

Reimplemented from TQSqlRecord.

void TQSqlIndex::append ( const TQSqlField & field, bool desc ) [virtual]
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Appends the field field to the list of indexed fields. The field is appended with an ascending sort order, unless desc is true.

TQString TQSqlIndex::cursorName () const
Returns the name of the cursor which the index is associated with.

TQSqlIndex TQSqlIndex::fromStringList ( const TQStringList & l, const TQSqlCursor * cursor ) [static]
Returns an index based on the field descriptions in l and the cursor cursor. The field descriptions should be in the same format that toStringList() produces, for example, a surname field in the people table might be in one of these forms: "surname"," surname DESC" or "people.surname ASC".

See also toStringList().

bool TQSqlIndex::isDescending ( int i ) const
Returns true if field i in the index is sorted in descending order; otherwise returns false.

TQString TQSqlIndex::name () const
Returns the name of the index.

TQSqlIndex & TQSqlIndex::operator= ( const TQSqlIndex & other )
Sets the index equal to other.

void TQSqlIndex::setCursorName ( const TQString & cursorName ) [virtual]
Sets the name of the cursor that the index is associated with to cursorName.

void TQSqlIndex::setDescending ( int i, bool desc ) [virtual]
If desc is true, field i is sorted in descending order. Otherwise, field i is sorted in ascending order (the default). If the field does not exist, nothing happens.

void TQSqlIndex::setName ( const TQString & name ) [virtual]
Sets the name of the index to name.

SEE ALSO
http://doc.trolltech.com/tqsqlindex.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you.

The definitive TQt documentation is provided in HTML format; it is located at $TQTDIR/doc/html and can be read using TQt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (tqsqlindex.3qt) and the Qt version (3.3.8).