summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqsqlcursor.3qt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man/man3/tqsqlcursor.3qt')
-rw-r--r--doc/man/man3/tqsqlcursor.3qt78
1 files changed, 39 insertions, 39 deletions
diff --git a/doc/man/man3/tqsqlcursor.3qt b/doc/man/man3/tqsqlcursor.3qt
index 1568ab2a..a4ba6609 100644
--- a/doc/man/man3/tqsqlcursor.3qt
+++ b/doc/man/man3/tqsqlcursor.3qt
@@ -18,7 +18,7 @@ Inherited by QSqlSelectCursor.
.SS "Public Members"
.in +1c
.ti -1c
-.BI "\fBQSqlCursor\fR ( const QString & name = QString::null, bool autopopulate = TRUE, QSqlDatabase * db = 0 )"
+.BI "\fBQSqlCursor\fR ( const TQString & name = TQString::null, bool autopopulate = TRUE, QSqlDatabase * db = 0 )"
.br
.ti -1c
.BI "\fBQSqlCursor\fR ( const QSqlCursor & other )"
@@ -39,7 +39,7 @@ Inherited by QSqlSelectCursor.
.BI "virtual QSqlIndex \fBindex\fR ( const QStringList & fieldNames ) const"
.br
.ti -1c
-.BI "QSqlIndex \fBindex\fR ( const QString & fieldName ) const"
+.BI "QSqlIndex \fBindex\fR ( const TQString & fieldName ) const"
.br
.ti -1c
.BI "QSqlIndex \fBindex\fR ( const char * fieldName ) const"
@@ -60,7 +60,7 @@ Inherited by QSqlSelectCursor.
.BI "virtual void \fBclear\fR ()"
.br
.ti -1c
-.BI "virtual void \fBsetGenerated\fR ( const QString & name, bool generated )"
+.BI "virtual void \fBsetGenerated\fR ( const TQString & name, bool generated )"
.br
.ti -1c
.BI "virtual void \fBsetGenerated\fR ( int i, bool generated )"
@@ -93,16 +93,16 @@ Inherited by QSqlSelectCursor.
.BI "int \fBmode\fR () const"
.br
.ti -1c
-.BI "virtual void \fBsetCalculated\fR ( const QString & name, bool calculated )"
+.BI "virtual void \fBsetCalculated\fR ( const TQString & name, bool calculated )"
.br
.ti -1c
-.BI "bool \fBisCalculated\fR ( const QString & name ) const"
+.BI "bool \fBisCalculated\fR ( const TQString & name ) const"
.br
.ti -1c
-.BI "virtual void \fBsetTrimmed\fR ( const QString & name, bool trim )"
+.BI "virtual void \fBsetTrimmed\fR ( const TQString & name, bool trim )"
.br
.ti -1c
-.BI "bool \fBisTrimmed\fR ( const QString & name ) const"
+.BI "bool \fBisTrimmed\fR ( const TQString & name ) const"
.br
.ti -1c
.BI "bool \fBisReadOnly\fR () const"
@@ -126,7 +126,7 @@ Inherited by QSqlSelectCursor.
.BI "bool \fBselect\fR ( const QSqlIndex & filter, const QSqlIndex & sort )"
.br
.ti -1c
-.BI "virtual bool \fBselect\fR ( const QString & filter, const QSqlIndex & sort = QSqlIndex ( ) )"
+.BI "virtual bool \fBselect\fR ( const TQString & filter, const QSqlIndex & sort = QSqlIndex ( ) )"
.br
.ti -1c
.BI "virtual void \fBsetSort\fR ( const QSqlIndex & sort )"
@@ -135,43 +135,43 @@ Inherited by QSqlSelectCursor.
.BI "QSqlIndex \fBsort\fR () const"
.br
.ti -1c
-.BI "virtual void \fBsetFilter\fR ( const QString & filter )"
+.BI "virtual void \fBsetFilter\fR ( const TQString & filter )"
.br
.ti -1c
-.BI "QString \fBfilter\fR () const"
+.BI "TQString \fBfilter\fR () const"
.br
.ti -1c
-.BI "virtual void \fBsetName\fR ( const QString & name, bool autopopulate = TRUE )"
+.BI "virtual void \fBsetName\fR ( const TQString & name, bool autopopulate = TRUE )"
.br
.ti -1c
-.BI "QString \fBname\fR () const"
+.BI "TQString \fBname\fR () const"
.br
.ti -1c
.BI "bool \fBisNull\fR ( int i ) const"
.br
.ti -1c
-.BI "bool \fBisNull\fR ( const QString & name ) const"
+.BI "bool \fBisNull\fR ( const TQString & name ) const"
.br
.in -1c
.SS "Protected Members"
.in +1c
.ti -1c
-.BI "virtual QVariant \fBcalculateField\fR ( const QString & name )"
+.BI "virtual QVariant \fBcalculateField\fR ( const TQString & name )"
.br
.ti -1c
-.BI "virtual int \fBupdate\fR ( const QString & filter, bool invalidate = TRUE )"
+.BI "virtual int \fBupdate\fR ( const TQString & filter, bool invalidate = TRUE )"
.br
.ti -1c
-.BI "virtual int \fBdel\fR ( const QString & filter, bool invalidate = TRUE )"
+.BI "virtual int \fBdel\fR ( const TQString & filter, bool invalidate = TRUE )"
.br
.ti -1c
-.BI "virtual QString \fBtoString\fR ( const QString & prefix, QSqlField * field, const QString & fieldSep ) const"
+.BI "virtual TQString \fBtoString\fR ( const TQString & prefix, QSqlField * field, const TQString & fieldSep ) const"
.br
.ti -1c
-.BI "virtual QString \fBtoString\fR ( QSqlRecord * rec, const QString & prefix, const QString & fieldSep, const QString & sep ) const"
+.BI "virtual TQString \fBtoString\fR ( QSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const"
.br
.ti -1c
-.BI "virtual QString \fBtoString\fR ( const QSqlIndex & i, QSqlRecord * rec, const QString & prefix, const QString & fieldSep, const QString & sep ) const"
+.BI "virtual TQString \fBtoString\fR ( const QSqlIndex & i, QSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const"
.br
.in -1c
.SH DESCRIPTION
@@ -239,7 +239,7 @@ After calling insert(), update() or del(), the cursor is no longer positioned on
.PP
QSqlCursor contains virtual methods which allow editing behavior to be customized by subclasses. This allows custom cursors to be created that encapsulate the editing behavior of a database table for an entire application. For example, a cursor can be customized to always auto-number primary index fields, or provide fields with suitable default values, when inserting new records. QSqlCursor generates SQL statements which are sent to the database engine; you can control which fields are included in these statements using setGenerated().
.PP
-Note that QSqlCursor does not inherit from QObject. This means that you are responsible for destroying instances of this class yourself. However if you create a QSqlCursor and use it in a QDataTable, QDataBrowser or a QDataView these classes will usually take ownership of the cursor and destroy it when they don't need it anymore. The documentation for QDataTable, QDataBrowser and QDataView explicitly states which calls take ownership of the cursor.
+Note that QSqlCursor does not inherit from TQObject. This means that you are responsible for destroying instances of this class yourself. However if you create a QSqlCursor and use it in a QDataTable, QDataBrowser or a QDataView these classes will usually take ownership of the cursor and destroy it when they don't need it anymore. The documentation for QDataTable, QDataBrowser and QDataView explicitly states which calls take ownership of the cursor.
.PP
See also Database Classes.
.SS "Member Type Documentation"
@@ -256,7 +256,7 @@ This enum type describes how QSqlCursor operates on records in the database.
.TP
\fCQSqlCursor::Writable\fR - the cursor can INSERT, UPDATE and DELETE records in the database.
.SH MEMBER FUNCTION DOCUMENTATION
-.SH "QSqlCursor::QSqlCursor ( const QString & name = QString::null, bool autopopulate = TRUE, QSqlDatabase * db = 0 )"
+.SH "QSqlCursor::QSqlCursor ( const TQString & name = TQString::null, bool autopopulate = TRUE, QSqlDatabase * db = 0 )"
Constructs a cursor on database \fIdb\fR using table or view \fIname\fR.
.PP
If \fIautopopulate\fR is TRUE (the default), the \fIname\fR of the cursor must correspond to an existing table or view name in the database so that field information can be automatically created. If the table or view does not exist, the cursor will not be functional.
@@ -272,7 +272,7 @@ Constructs a copy of \fIother\fR.
Destroys the object and frees any allocated resources.
.SH "void QSqlCursor::append ( const QSqlFieldInfo & fieldInfo )\fC [virtual]\fR"
Append a copy of field \fIfieldInfo\fR to the end of the cursor. Note that all references to the cursor edit buffer become invalidated.
-.SH "QVariant QSqlCursor::calculateField ( const QString & name )\fC [virtual protected]\fR"
+.SH "QVariant QSqlCursor::calculateField ( const TQString & name )\fC [virtual protected]\fR"
Protected virtual function which is called whenever a field needs to be calculated. If calculated fields are being used, derived classes must reimplement this function and return the appropriate value for field \fIname\fR. The default implementation returns an invalid QVariant.
.PP
See also setCalculated().
@@ -320,7 +320,7 @@ In the above example, a cursor is created on the 'prices' table and positioned t
See also primeDelete(), setMode(), and lastError().
.PP
Example: sql/overview/delete/main.cpp.
-.SH "int QSqlCursor::del ( const QString & filter, bool invalidate = TRUE )\fC [virtual protected]\fR"
+.SH "int QSqlCursor::del ( const TQString & filter, bool invalidate = TRUE )\fC [virtual protected]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Deletes the current cursor record from the database using the filter \fIfilter\fR. Only records which meet the filter criteria are deleted. Returns the number of records which were deleted. If \fIinvalidate\fR is TRUE (the default), the current cursor can no longer be navigated. A new select() call must be made before you can move to a valid record. For error information, use lastError().
@@ -332,7 +332,7 @@ See also setMode() and lastError().
Returns the current internal edit buffer. If \fIcopy\fR is TRUE (the default is FALSE), the current cursor field values are first copied into the edit buffer. The edit buffer is valid as long as the cursor remains valid. The cursor retains ownership of the returned pointer, so it must not be deleted or modified.
.PP
See also primeInsert(), primeUpdate(), and primeDelete().
-.SH "QString QSqlCursor::filter () const"
+.SH "TQString QSqlCursor::filter () const"
Returns the current filter, or an empty string if there is no current filter.
.SH "QSqlIndex QSqlCursor::index ( const QStringList & fieldNames ) const\fC [virtual]\fR"
Returns an index composed of \fIfieldNames\fR, all in ASCending order. Note that all field names must exist in the cursor, otherwise an empty index is returned.
@@ -341,7 +341,7 @@ See also QSqlIndex.
.PP
Examples:
.)l sql/overview/extract/main.cpp, sql/overview/order1/main.cpp, sql/overview/order2/main.cpp, and sql/overview/table3/main.cpp.
-.SH "QSqlIndex QSqlCursor::index ( const QString & fieldName ) const"
+.SH "QSqlIndex QSqlCursor::index ( const TQString & fieldName ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns an index based on \fIfieldName\fR.
@@ -379,7 +379,7 @@ If \fIinvalidate\fR is TRUE (the default), the cursor will no longer be position
In the above example, a cursor is created on the 'prices' table and a pointer to the insert buffer is acquired using primeInsert(). Each field's value is set to the desired value and then insert() is called to insert the data into the database. Remember: all edit operations (insert(), update() and delete()) operate on the contents of the cursor edit buffer and not on the contents of the cursor itself.
.PP
See also setMode() and lastError().
-.SH "bool QSqlCursor::isCalculated ( const QString & name ) const"
+.SH "bool QSqlCursor::isCalculated ( const TQString & name ) const"
Returns TRUE if the field \fIname\fR exists and is calculated; otherwise returns FALSE.
.PP
See also setCalculated().
@@ -387,7 +387,7 @@ See also setCalculated().
Returns TRUE if the field \fIi\fR is NULL or if there is no field at position \fIi\fR; otherwise returns FALSE.
.PP
This is the same as calling QSqlRecord::isNull( \fIi\fR )
-.SH "bool QSqlCursor::isNull ( const QString & name ) const"
+.SH "bool QSqlCursor::isNull ( const TQString & name ) const"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns TRUE if the field called \fIname\fR is NULL or if there is no field called \fIname\fR; otherwise returns FALSE.
@@ -397,7 +397,7 @@ This is the same as calling QSqlRecord::isNull( \fIname\fR )
Returns TRUE if the cursor is read-only; otherwise returns FALSE. The default is FALSE. Read-only cursors cannot be edited using insert(), update() or del().
.PP
See also setMode().
-.SH "bool QSqlCursor::isTrimmed ( const QString & name ) const"
+.SH "bool QSqlCursor::isTrimmed ( const TQString & name ) const"
Returns TRUE if the field \fIname\fR exists and is trimmed; otherwise returns FALSE.
.PP
When a trimmed field of type string or cstring is read from the database any trailing (right-most) spaces are removed.
@@ -407,7 +407,7 @@ See also setTrimmed().
Returns the current cursor mode.
.PP
See also setMode().
-.SH "QString QSqlCursor::name () const"
+.SH "TQString QSqlCursor::name () const"
Returns the name of the cursor.
.SH "QSqlCursor & QSqlCursor::operator= ( const QSqlCursor & other )"
Sets the cursor equal to \fIother\fR.
@@ -437,7 +437,7 @@ Examples:
Removes the field at \fIpos\fR. If \fIpos\fR does not exist, nothing happens. Note that all references to the cursor edit buffer become invalidated.
.PP
Reimplemented from QSqlRecord.
-.SH "bool QSqlCursor::select ( const QString & filter, const QSqlIndex & sort = QSqlIndex ( ) )\fC [virtual]\fR"
+.SH "bool QSqlCursor::select ( const TQString & filter, const QSqlIndex & sort = QSqlIndex ( ) )\fC [virtual]\fR"
Selects all fields in the cursor from the database matching the filter criteria \fIfilter\fR. The data is returned in the order specified by the index \fIsort\fR. Returns TRUE if the data was successfully selected; otherwise returns FALSE.
.PP
The \fIfilter\fR is a string containing a SQL \fCWHERE\fR clause but without the 'WHERE' keyword. The cursor is initially positioned at an invalid row after this function is called. To move to a valid row, use seek(), first(), last(), prev() or next().
@@ -520,15 +520,15 @@ Selects all fields in the cursor matching the filter index \fIfilter\fR. The dat
.fi
.PP
In this example the QSqlIndex, pk, is used for two different purposes. When used as the filter (first) argument, the field names it contains are used to construct the WHERE clause, each set to the current cursor value, \fCWHERE id=10\fR, in this case. When used as the sort (second) argument the field names it contains are used for the ORDER BY clause, \fCORDER BY id\fR in this example.
-.SH "void QSqlCursor::setCalculated ( const QString & name, bool calculated )\fC [virtual]\fR"
+.SH "void QSqlCursor::setCalculated ( const TQString & name, bool calculated )\fC [virtual]\fR"
Sets field \fIname\fR to \fIcalculated\fR. If the field \fIname\fR does not exist, nothing happens. The value of a calculated field is set by the calculateField() virtual function which you must reimplement (or the field value will be an invalid QVariant). Calculated fields do not appear in generated SQL statements sent to the database.
.PP
See also calculateField() and QSqlRecord::setGenerated().
-.SH "void QSqlCursor::setFilter ( const QString & filter )\fC [virtual]\fR"
+.SH "void QSqlCursor::setFilter ( const TQString & filter )\fC [virtual]\fR"
Sets the current filter to \fIfilter\fR. Note that no new records are selected. To select new records, use select(). The \fIfilter\fR will apply to any subsequent select() calls that do not explicitly specify a filter.
.PP
The filter is a SQL \fCWHERE\fR clause without the keyword 'WHERE', e.g. \fCname='Dave'\fR which will be processed by the DBMS.
-.SH "void QSqlCursor::setGenerated ( const QString & name, bool generated )\fC [virtual]\fR"
+.SH "void QSqlCursor::setGenerated ( const TQString & name, bool generated )\fC [virtual]\fR"
Sets the generated flag for the field \fIname\fR to \fIgenerated\fR. If the field does not exist, nothing happens. Only fields that have \fIgenerated\fR set to TRUE are included in the SQL that is generated by insert(), update() or del().
.PP
See also isGenerated().
@@ -561,7 +561,7 @@ Sets the cursor mode to \fImode\fR. This value can be an OR'ed combination of QS
.br
.br
.fi
-.SH "void QSqlCursor::setName ( const QString & name, bool autopopulate = TRUE )\fC [virtual]\fR"
+.SH "void QSqlCursor::setName ( const TQString & name, bool autopopulate = TRUE )\fC [virtual]\fR"
Sets the name of the cursor to \fIname\fR. If \fIautopopulate\fR is TRUE (the default), the \fIname\fR must correspond to a valid table or view name in the database. Also, note that all references to the cursor edit buffer become invalidated when fields are auto-populated. See the QSqlCursor constructor documentation for more information.
.SH "void QSqlCursor::setPrimaryIndex ( const QSqlIndex & idx )\fC [virtual]\fR"
Sets the primary index associated with the cursor to the index \fIidx\fR. Note that this index must contain a field or set of fields which identify a unique record within the underlying database table or view so that update() and del() will execute as expected.
@@ -569,7 +569,7 @@ Sets the primary index associated with the cursor to the index \fIidx\fR. Note t
See also update() and del().
.SH "void QSqlCursor::setSort ( const QSqlIndex & sort )\fC [virtual]\fR"
Sets the current sort to \fIsort\fR. Note that no new records are selected. To select new records, use select(). The \fIsort\fR will apply to any subsequent select() calls that do not explicitly specify a sort.
-.SH "void QSqlCursor::setTrimmed ( const QString & name, bool trim )\fC [virtual]\fR"
+.SH "void QSqlCursor::setTrimmed ( const TQString & name, bool trim )\fC [virtual]\fR"
Sets field \fIname\fR's trimmed status to \fItrim\fR. If the field \fIname\fR does not exist, nothing happens.
.PP
When a trimmed field of type string or cstring is read from the database any trailing (right-most) spaces are removed.
@@ -577,15 +577,15 @@ When a trimmed field of type string or cstring is read from the database any tra
See also isTrimmed() and QVariant.
.SH "QSqlIndex QSqlCursor::sort () const"
Returns the current sort, or an empty index if there is no current sort.
-.SH "QString QSqlCursor::toString ( QSqlRecord * rec, const QString & prefix, const QString & fieldSep, const QString & sep ) const\fC [virtual protected]\fR"
+.SH "TQString QSqlCursor::toString ( QSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const\fC [virtual protected]\fR"
Returns a formatted string composed of all the fields in \fIrec\fR. Each field is composed of the \fIprefix\fR (e.g. table or view name),"
.", the field name, the \fIfieldSep\fR and the field value. If the
\fIprefix\fR is empty then each field will begin with the field name. The fields are then joined together separated by \fIsep\fR. Fields where isGenerated() returns FALSE are not included. This function is useful for generating SQL statements.
-.SH "QString QSqlCursor::toString ( const QString & prefix, QSqlField * field, const QString & fieldSep ) const\fC [virtual protected]\fR"
+.SH "TQString QSqlCursor::toString ( const TQString & prefix, QSqlField * field, const TQString & fieldSep ) const\fC [virtual protected]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns a formatted string composed of the \fIprefix\fR (e.g. table or view name), ".", the \fIfield\fR name, the \fIfieldSep\fR and the field value. If the \fIprefix\fR is empty then the string will begin with the \fIfield\fR name. This function is useful for generating SQL statements.
-.SH "QString QSqlCursor::toString ( const QSqlIndex & i, QSqlRecord * rec, const QString & prefix, const QString & fieldSep, const QString & sep ) const\fC [virtual protected]\fR"
+.SH "TQString QSqlCursor::toString ( const QSqlIndex & i, QSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const\fC [virtual protected]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns a formatted string composed of all the fields in the index \fIi\fR. Each field is composed of the \fIprefix\fR (e.g. table or view name), ".", the field name, the \fIfieldSep\fR and the field value. If the \fIprefix\fR is empty then each field will begin with the field name. The field values are taken from \fIrec\fR. The fields are then joined together separated by \fIsep\fR. Fields where isGenerated() returns FALSE are ignored. This function is useful for generating SQL statements.
@@ -624,7 +624,7 @@ Note that if the primary index does not uniquely distinguish records the databas
See also setMode() and lastError().
.PP
Example: sql/overview/update/main.cpp.
-.SH "int QSqlCursor::update ( const QString & filter, bool invalidate = TRUE )\fC [virtual protected]\fR"
+.SH "int QSqlCursor::update ( const TQString & filter, bool invalidate = TRUE )\fC [virtual protected]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Updates the database with the current contents of the cursor edit buffer using the specified \fIfilter\fR. Returns the number of records which were updated. For error information, use lastError().