summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqsqlindex.3qt
blob: b226b887a2122357204bb5ee47affa5bd47a6131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
'\" t
.TH TQSqlIndex 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA.  All rights reserved.  See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQSqlIndex \- Functions to manipulate and describe TQSqlCursor and TQSqlDatabase indexes
.SH SYNOPSIS
\fC#include <tqsqlindex.h>\fR
.PP
Inherits TQSqlRecord.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQSqlIndex\fR ( const TQString & cursorname = TQString::null, const TQString & name = TQString::null )"
.br
.ti -1c
.BI "\fBQSqlIndex\fR ( const TQSqlIndex & other )"
.br
.ti -1c
.BI "\fB~TQSqlIndex\fR ()"
.br
.ti -1c
.BI "TQSqlIndex & \fBoperator=\fR ( const TQSqlIndex & other )"
.br
.ti -1c
.BI "virtual void \fBsetCursorName\fR ( const TQString & cursorName )"
.br
.ti -1c
.BI "TQString \fBcursorName\fR () const"
.br
.ti -1c
.BI "virtual void \fBsetName\fR ( const TQString & name )"
.br
.ti -1c
.BI "TQString \fBname\fR () const"
.br
.ti -1c
.BI "virtual void \fBappend\fR ( const TQSqlField & field )"
.br
.ti -1c
.BI "virtual void \fBappend\fR ( const TQSqlField & field, bool desc )"
.br
.ti -1c
.BI "bool \fBisDescending\fR ( int i ) const"
.br
.ti -1c
.BI "virtual void \fBsetDescending\fR ( int i, bool desc )"
.br
.in -1c
.SS "Static Public Members"
.in +1c
.ti -1c
.BI "TQSqlIndex \fBfromStringList\fR ( const QStringList & l, const TQSqlCursor * cursor )"
.br
.in -1c
.SH DESCRIPTION
The TQSqlIndex class provides functions to manipulate and describe TQSqlCursor and TQSqlDatabase indexes.
.PP
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.
.PP
Normally, TQSqlIndex objects are created by TQSqlDatabase or TQSqlCursor.
.PP
See also Database Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQSqlIndex::TQSqlIndex ( const TQString & cursorname = TQString::null, const TQString & name = TQString::null )"
Constructs an empty index using the cursor name \fIcursorname\fR and index name \fIname\fR.
.SH "TQSqlIndex::TQSqlIndex ( const TQSqlIndex & other )"
Constructs a copy of \fIother\fR.
.SH "TQSqlIndex::~TQSqlIndex ()"
Destroys the object and frees any allocated resources.
.SH "void TQSqlIndex::append ( const TQSqlField & field )\fC [virtual]\fR"
Appends the field \fIfield\fR to the list of indexed fields. The field is appended with an ascending sort order.
.PP
Reimplemented from TQSqlRecord.
.SH "void TQSqlIndex::append ( const TQSqlField & field, bool desc )\fC [virtual]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Appends the field \fIfield\fR to the list of indexed fields. The field is appended with an ascending sort order, unless \fIdesc\fR is TRUE.
.SH "TQString TQSqlIndex::cursorName () const"
Returns the name of the cursor which the index is associated with.
.SH "TQSqlIndex TQSqlIndex::fromStringList ( const QStringList & l, const TQSqlCursor * cursor )\fC [static]\fR"
Returns an index based on the field descriptions in \fIl\fR and the cursor \fIcursor\fR. 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".
.PP
See also toStringList().
.SH "bool TQSqlIndex::isDescending ( int i ) const"
Returns TRUE if field \fIi\fR in the index is sorted in descending order; otherwise returns FALSE.
.SH "TQString TQSqlIndex::name () const"
Returns the name of the index.
.SH "TQSqlIndex & TQSqlIndex::operator= ( const TQSqlIndex & other )"
Sets the index equal to \fIother\fR.
.SH "void TQSqlIndex::setCursorName ( const TQString & cursorName )\fC [virtual]\fR"
Sets the name of the cursor that the index is associated with to \fIcursorName\fR.
.SH "void TQSqlIndex::setDescending ( int i, bool desc )\fC [virtual]\fR"
If \fIdesc\fR is TRUE, field \fIi\fR is sorted in descending order. Otherwise, field \fIi\fR is sorted in ascending order (the default). If the field does not exist, nothing happens.
.SH "void TQSqlIndex::setName ( const TQString & name )\fC [virtual]\fR"
Sets the name of the index to \fIname\fR.

.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqsqlindex.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
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. 
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tqsqlindex.3qt) and the Qt
version (3.3.8).