summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqsqlquery.3qt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man/man3/tqsqlquery.3qt')
-rw-r--r--doc/man/man3/tqsqlquery.3qt60
1 files changed, 30 insertions, 30 deletions
diff --git a/doc/man/man3/tqsqlquery.3qt b/doc/man/man3/tqsqlquery.3qt
index d842ee412..5bf2321c6 100644
--- a/doc/man/man3/tqsqlquery.3qt
+++ b/doc/man/man3/tqsqlquery.3qt
@@ -79,7 +79,7 @@ Inherited by TQSqlCursor.
.BI "virtual TQVariant \fBvalue\fR ( int i ) const"
.br
.ti -1c
-.BI "virtual bool \fBseek\fR ( int i, bool relative = FALSE )"
+.BI "virtual bool \fBseek\fR ( int i, bool relative = false )"
.br
.ti -1c
.BI "virtual bool \fBnext\fR ()"
@@ -144,7 +144,7 @@ The TQSqlQuery class provides a means of executing and manipulating SQL statemen
.PP
TQSqlQuery encapsulates the functionality involved in creating, navigating and retrieving data from SQL queries which are executed on a TQSqlDatabase. It can be used to execute DML (data manipulation language) statements, e.g. \fCSELECT\fR, \fCINSERT\fR, \fCUPDATE\fR and \fCDELETE\fR, and also DDL (data definition language) statements, e.g. \fCCREATE TABLE\fR. It can also be used to execute database-specific commands which are not standard SQL (e.g. \fCSET DATESTYLE=ISO\fR for PostgreSQL).
.PP
-Successfully executed SQL statements set the query's state to active (isActive() returns TRUE); otherwise the query's state is set to inactive. In either case, when executing a new SQL statement, the query is positioned on an invalid record; an active query must be navigated to a valid record (so that isValid() returns TRUE) before values can be retrieved.
+Successfully executed SQL statements set the query's state to active (isActive() returns true); otherwise the query's state is set to inactive. In either case, when executing a new SQL statement, the query is positioned on an invalid record; an active query must be navigated to a valid record (so that isValid() returns true) before values can be retrieved.
.PP
Navigating records is performed with the following functions:
.TP
@@ -382,7 +382,7 @@ The bound values can be examined in the following way:
.SH "const TQSqlDriver * TQSqlQuery::driver () const"
Returns the database driver associated with the query.
.SH "bool TQSqlQuery::exec ( const TQString & query )\fC [virtual]\fR"
-Executes the SQL in \fIquery\fR. Returns TRUE and sets the query state to active if the query was successful; otherwise returns FALSE and sets the query state to inactive. The \fIquery\fR string must use syntax appropriate for the SQL database being queried, for example, standard SQL.
+Executes the SQL in \fIquery\fR. Returns true and sets the query state to active if the query was successful; otherwise returns false and sets the query state to inactive. The \fIquery\fR string must use syntax appropriate for the SQL database being queried, for example, standard SQL.
.PP
After the query is executed, the query is positioned on an \fIinvalid\fR record, and must be navigated to a valid record before data values can be retrieved, e.g. using next().
.PP
@@ -395,7 +395,7 @@ Examples:
.SH "bool TQSqlQuery::exec ()"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
-Executes a previously prepared SQL query. Returns TRUE if the query executed successfully; otherwise returns FALSE.
+Executes a previously prepared SQL query. Returns true if the query executed successfully; otherwise returns false.
.PP
See also prepare(), bindValue(), and addBindValue().
.SH "TQString TQSqlQuery::executedQuery () const"
@@ -405,30 +405,30 @@ In most cases this function returns the same as lastQuery(). If a prepared query
.PP
See also lastQuery().
.SH "bool TQSqlQuery::first ()\fC [virtual]\fR"
-Retrieves the first record in the result, if available, and positions the query on the retrieved record. Note that the result must be in an active state and isSelect() must return TRUE before calling this function or it will do nothing and return FALSE. Returns TRUE if successful. If unsuccessful the query position is set to an invalid position and FALSE is returned.
+Retrieves the first record in the result, if available, and positions the query on the retrieved record. Note that the result must be in an active state and isSelect() must return true before calling this function or it will do nothing and return false. Returns true if successful. If unsuccessful the query position is set to an invalid position and false is returned.
.PP
See also next(), prev(), last(), seek(), at(), isActive(), and isValid().
.PP
Example: sql/overview/navigating/main.cpp.
.SH "bool TQSqlQuery::isActive () const"
-Returns TRUE if the query is currently active; otherwise returns FALSE.
+Returns true if the query is currently active; otherwise returns false.
.PP
Examples:
.)l sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/basicdatamanip/main.cpp, sql/overview/navigating/main.cpp, and sql/overview/retrieve1/main.cpp.
.SH "bool TQSqlQuery::isForwardOnly () const"
-Returns TRUE if you can only scroll \fIforward\fR through a result set; otherwise returns FALSE.
+Returns true if you can only scroll \fIforward\fR through a result set; otherwise returns false.
.PP
See also setForwardOnly().
.SH "bool TQSqlQuery::isNull ( int field ) const"
-Returns TRUE if the query is active and positioned on a valid record and the \fIfield\fR is NULL; otherwise returns FALSE. Note that for some drivers isNull() will not return accurate information until after an attempt is made to retrieve data.
+Returns true if the query is active and positioned on a valid record and the \fIfield\fR is NULL; otherwise returns false. Note that for some drivers isNull() will not return accurate information until after an attempt is made to retrieve data.
.PP
See also isActive(), isValid(), and value().
.SH "bool TQSqlQuery::isSelect () const"
-Returns TRUE if the current query is a \fCSELECT\fR statement; otherwise returns FALSE.
+Returns true if the current query is a \fCSELECT\fR statement; otherwise returns false.
.SH "bool TQSqlQuery::isValid () const"
-Returns TRUE if the query is currently positioned on a valid record; otherwise returns FALSE.
+Returns true if the query is currently positioned on a valid record; otherwise returns false.
.SH "bool TQSqlQuery::last ()\fC [virtual]\fR"
-Retrieves the last record in the result, if available, and positions the query on the retrieved record. Note that the result must be in an active state and isSelect() must return TRUE before calling this function or it will do nothing and return FALSE. Returns TRUE if successful. If unsuccessful the query position is set to an invalid position and FALSE is returned.
+Retrieves the last record in the result, if available, and positions the query on the retrieved record. Note that the result must be in an active state and isSelect() must return true before calling this function or it will do nothing and return false. Returns true if successful. If unsuccessful the query position is set to an invalid position and false is returned.
.PP
See also next(), prev(), first(), seek(), at(), isActive(), and isValid().
.PP
@@ -442,26 +442,26 @@ Returns the text of the current query being used, or TQString::null if there is
.PP
See also executedQuery().
.SH "bool TQSqlQuery::next ()\fC [virtual]\fR"
-Retrieves the next record in the result, if available, and positions the query on the retrieved record. Note that the result must be in an active state and isSelect() must return TRUE before calling this function or it will do nothing and return FALSE.
+Retrieves the next record in the result, if available, and positions the query on the retrieved record. Note that the result must be in an active state and isSelect() must return true before calling this function or it will do nothing and return false.
.PP
The following rules apply:
.TP
If the result is currently located before the first record, e.g. immediately after a query is executed, an attempt is made to retrieve the first record.
.IP
.TP
-If the result is currently located after the last record, there is no change and FALSE is returned.
+If the result is currently located after the last record, there is no change and false is returned.
.IP
.TP
If the result is located somewhere in the middle, an attempt is made to retrieve the next record.
.PP
-If the record could not be retrieved, the result is positioned after the last record and FALSE is returned. If the record is successfully retrieved, TRUE is returned.
+If the record could not be retrieved, the result is positioned after the last record and false is returned. If the record is successfully retrieved, true is returned.
.PP
See also prev(), first(), last(), seek(), at(), isActive(), and isValid().
.PP
Examples:
.)l sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/delete/main.cpp, sql/overview/order1/main.cpp, sql/overview/retrieve1/main.cpp, sql/overview/subclass4/main.cpp, and sql/overview/subclass5/main.cpp.
.SH "int TQSqlQuery::numRowsAffected () const"
-Returns the number of rows affected by the result's SQL statement, or -1 if it cannot be determined. Note that for \fCSELECT\fR statements, the value is undefined; see size() instead. If the query is not active (isActive() returns FALSE), -1 is returned.
+Returns the number of rows affected by the result's SQL statement, or -1 if it cannot be determined. Note that for \fCSELECT\fR statements, the value is undefined; see size() instead. If the query is not active (isActive() returns false), -1 is returned.
.PP
See also size() and TQSqlDriver::hasFeature().
.PP
@@ -474,11 +474,11 @@ Prepares the SQL query \fIquery\fR for execution. The query may contain placehol
.PP
See also exec(), bindValue(), and addBindValue().
.SH "bool TQSqlQuery::prev ()\fC [virtual]\fR"
-Retrieves the previous record in the result, if available, and positions the query on the retrieved record. Note that the result must be in an active state and isSelect() must return TRUE before calling this function or it will do nothing and return FALSE.
+Retrieves the previous record in the result, if available, and positions the query on the retrieved record. Note that the result must be in an active state and isSelect() must return true before calling this function or it will do nothing and return false.
.PP
The following rules apply:
.TP
-If the result is currently located before the first record, there is no change and FALSE is returned.
+If the result is currently located before the first record, there is no change and false is returned.
.IP
.TP
If the result is currently located after the last record, an attempt is made to retrieve the last record.
@@ -486,35 +486,35 @@ If the result is currently located after the last record, an attempt is made to
.TP
If the result is somewhere in the middle, an attempt is made to retrieve the previous record.
.PP
-If the record could not be retrieved, the result is positioned before the first record and FALSE is returned. If the record is successfully retrieved, TRUE is returned.
+If the record could not be retrieved, the result is positioned before the first record and false is returned. If the record is successfully retrieved, true is returned.
.PP
See also next(), first(), last(), seek(), at(), isActive(), and isValid().
.SH "const TQSqlResult * TQSqlQuery::result () const"
Returns the result associated with the query.
-.SH "bool TQSqlQuery::seek ( int i, bool relative = FALSE )\fC [virtual]\fR"
-Retrieves the record at position (offset) \fIi\fR, if available, and positions the query on the retrieved record. The first record is at position 0. Note that the query must be in an active state and isSelect() must return TRUE before calling this function.
+.SH "bool TQSqlQuery::seek ( int i, bool relative = false )\fC [virtual]\fR"
+Retrieves the record at position (offset) \fIi\fR, if available, and positions the query on the retrieved record. The first record is at position 0. Note that the query must be in an active state and isSelect() must return true before calling this function.
.PP
-If \fIrelative\fR is FALSE (the default), the following rules apply:
+If \fIrelative\fR is false (the default), the following rules apply:
.TP
-If \fIi\fR is negative, the result is positioned before the first record and FALSE is returned.
+If \fIi\fR is negative, the result is positioned before the first record and false is returned.
.TP
-Otherwise, an attempt is made to move to the record at position \fIi\fR. If the record at position \fIi\fR could not be retrieved, the result is positioned after the last record and FALSE is returned. If the record is successfully retrieved, TRUE is returned.
+Otherwise, an attempt is made to move to the record at position \fIi\fR. If the record at position \fIi\fR could not be retrieved, the result is positioned after the last record and false is returned. If the record is successfully retrieved, true is returned.
.PP
-If \fIrelative\fR is TRUE, the following rules apply:
+If \fIrelative\fR is true, the following rules apply:
.TP
-If the result is currently positioned before the first record or on the first record, and \fIi\fR is negative, there is no change, and FALSE is returned.
+If the result is currently positioned before the first record or on the first record, and \fIi\fR is negative, there is no change, and false is returned.
.TP
-If the result is currently located after the last record, and \fIi\fR is positive, there is no change, and FALSE is returned.
+If the result is currently located after the last record, and \fIi\fR is positive, there is no change, and false is returned.
.TP
-If the result is currently located somewhere in the middle, and the relative offset \fIi\fR moves the result below zero, the result is positioned before the first record and FALSE is returned.
+If the result is currently located somewhere in the middle, and the relative offset \fIi\fR moves the result below zero, the result is positioned before the first record and false is returned.
.TP
-Otherwise, an attempt is made to move to the record \fIi\fR records ahead of the current record (or \fIi\fR records behind the current record if \fIi\fR is negative). If the record at offset \fIi\fR could not be retrieved, the result is positioned after the last record if \fIi\fR >= 0, (or before the first record if \fIi\fR is negative), and FALSE is returned. If the record is successfully retrieved, TRUE is returned.
+Otherwise, an attempt is made to move to the record \fIi\fR records ahead of the current record (or \fIi\fR records behind the current record if \fIi\fR is negative). If the record at offset \fIi\fR could not be retrieved, the result is positioned after the last record if \fIi\fR >= 0, (or before the first record if \fIi\fR is negative), and false is returned. If the record is successfully retrieved, true is returned.
.PP
See also next(), prev(), first(), last(), at(), isActive(), and isValid().
.PP
Example: sql/overview/navigating/main.cpp.
.SH "void TQSqlQuery::setForwardOnly ( bool forward )"
-Sets forward only mode to \fIforward\fR. If forward is TRUE only next(), and seek() with positive values, are allowed for navigating the results. Forward only mode needs far less memory since results do not need to be cached.
+Sets forward only mode to \fIforward\fR. If forward is true only next(), and seek() with positive values, are allowed for navigating the results. Forward only mode needs far less memory since results do not need to be cached.
.PP
Forward only mode is off by default.
.PP
@@ -522,7 +522,7 @@ Forward only mode cannot be used with data aware widgets like TQDataTable, since
.PP
See also isForwardOnly(), next(), and seek().
.SH "int TQSqlQuery::size () const"
-Returns the size of the result, (number of rows returned), or -1 if the size cannot be determined or if the database does not support reporting information about query sizes. Note that for non-\fCSELECT\fR statements (isSelect() returns FALSE), size() will return -1. If the query is not active (isActive() returns FALSE), -1 is returned.
+Returns the size of the result, (number of rows returned), or -1 if the size cannot be determined or if the database does not support reporting information about query sizes. Note that for non-\fCSELECT\fR statements (isSelect() returns false), size() will return -1. If the query is not active (isActive() returns false), -1 is returned.
.PP
To determine the number of rows affected by a non-SELECT statement, use numRowsAffected().
.PP