1QSqlIndex(3qt)                                                  QSqlIndex(3qt)
2
3
4

NAME

6       QSqlIndex - Functions to manipulate and describe QSqlCursor and
7       QSqlDatabase indexes
8

SYNOPSIS

10       #include <qsqlindex.h>
11
12       Inherits QSqlRecord.
13
14   Public Members
15       QSqlIndex ( const QString & cursorname = QString::null, const QString &
16           name = QString::null )
17       QSqlIndex ( const QSqlIndex & other )
18       ~QSqlIndex ()
19       QSqlIndex & operator= ( const QSqlIndex & other )
20       virtual void setCursorName ( const QString & cursorName )
21       QString cursorName () const
22       virtual void setName ( const QString & name )
23       QString name () const
24       virtual void append ( const QSqlField & field )
25       virtual void append ( const QSqlField & field, bool desc )
26       bool isDescending ( int i ) const
27       virtual void setDescending ( int i, bool desc )
28
29   Static Public Members
30       QSqlIndex fromStringList ( const QStringList & l, const QSqlCursor *
31           cursor )
32

DESCRIPTION

34       The QSqlIndex class provides functions to manipulate and describe
35       QSqlCursor and QSqlDatabase indexes.
36
37       This class is used to describe and manipulate QSqlCursor and
38       QSqlDatabase indexes. An index refers to a single table or view in a
39       database. Information about the fields that comprise the index can be
40       used to generate SQL statements, or to affect the behavior of a
41       QSqlCursor object.
42
43       Normally, QSqlIndex objects are created by QSqlDatabase or QSqlCursor.
44
45       See also Database Classes.
46

MEMBER FUNCTION DOCUMENTATION

QSqlIndex::QSqlIndex ( const QString & cursorname = QString::null, const

49       QString & name = QString::null )
50       Constructs an empty index using the cursor name cursorname and index
51       name name.
52

QSqlIndex::QSqlIndex ( const QSqlIndex & other )

54       Constructs a copy of other.
55

QSqlIndex::~QSqlIndex ()

57       Destroys the object and frees any allocated resources.
58

void QSqlIndex::append ( const QSqlField & field ) [virtual]

60       Appends the field field to the list of indexed fields. The field is
61       appended with an ascending sort order.
62
63       Reimplemented from QSqlRecord.
64

void QSqlIndex::append ( const QSqlField & field, bool desc ) [virtual]

66       This is an overloaded member function, provided for convenience. It
67       behaves essentially like the above function.
68
69       Appends the field field to the list of indexed fields. The field is
70       appended with an ascending sort order, unless desc is TRUE.
71

QString QSqlIndex::cursorName () const

73       Returns the name of the cursor which the index is associated with.
74

QSqlIndex QSqlIndex::fromStringList ( const QStringList & l, const QSqlCursor

76       * cursor ) [static]
77       Returns an index based on the field descriptions in l and the cursor
78       cursor. The field descriptions should be in the same format that
79       toStringList() produces, for example, a surname field in the people
80       table might be in one of these forms: "surname"," surname DESC" or
81       "people.surname ASC".
82
83       See also toStringList().
84

bool QSqlIndex::isDescending ( int i ) const

86       Returns TRUE if field i in the index is sorted in descending order;
87       otherwise returns FALSE.
88

QString QSqlIndex::name () const

90       Returns the name of the index.
91

QSqlIndex & QSqlIndex::operator= ( const QSqlIndex & other )

93       Sets the index equal to other.
94

void QSqlIndex::setCursorName ( const QString & cursorName ) [virtual]

96       Sets the name of the cursor that the index is associated with to
97       cursorName.
98

void QSqlIndex::setDescending ( int i, bool desc ) [virtual]

100       If desc is TRUE, field i is sorted in descending order. Otherwise,
101       field i is sorted in ascending order (the default). If the field does
102       not exist, nothing happens.
103

void QSqlIndex::setName ( const QString & name ) [virtual]

105       Sets the name of the index to name.
106
107

SEE ALSO

109       http://doc.trolltech.com/qsqlindex.html
110       http://www.trolltech.com/faq/tech.html
111
113       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
114       license file included in the distribution for a complete license
115       statement.
116

AUTHOR

118       Generated automatically from the source code.
119

BUGS

121       If you find a bug in Qt, please report it as described in
122       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
123       help you. Thank you.
124
125       The definitive Qt documentation is provided in HTML format; it is
126       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
127       web browser. This man page is provided as a convenience for those users
128       who prefer man pages, although this format is not officially supported
129       by Trolltech.
130
131       If you find errors in this manual page, please report them to qt-
132       bugs@trolltech.com.  Please include the name of the manual page
133       (qsqlindex.3qt) and the Qt version (3.3.8).
134
135
136
137Trolltech AS                    2 February 2007                 QSqlIndex(3qt)
Impressum