diff options
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/kernel/qsqldatabase.cpp | 174 | ||||
-rw-r--r-- | src/sql/kernel/qsqldriver.cpp | 8 | ||||
-rw-r--r-- | src/sql/kernel/qsqlquery.cpp | 44 | ||||
-rw-r--r-- | src/sql/models/qsqlrelationaltablemodel.cpp | 14 |
4 files changed, 120 insertions, 120 deletions
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp index 7b6a2b8c12..d4633cea57 100644 --- a/src/sql/kernel/qsqldatabase.cpp +++ b/src/sql/kernel/qsqldatabase.cpp @@ -650,16 +650,16 @@ QStringList QSqlDatabase::connectionNames() The currently available driver types are: \table - \header \i Driver Type \i Description - \row \i QDB2 \i IBM DB2 - \row \i QIBASE \i Borland InterBase Driver - \row \i QMYSQL \i MySQL Driver - \row \i QOCI \i Oracle Call Interface Driver - \row \i QODBC \i ODBC Driver (includes Microsoft SQL Server) - \row \i QPSQL \i PostgreSQL Driver - \row \i QSQLITE \i SQLite version 3 or above - \row \i QSQLITE2 \i SQLite version 2 - \row \i QTDS \i Sybase Adaptive Server + \header \li Driver Type \li Description + \row \li QDB2 \li IBM DB2 + \row \li QIBASE \li Borland InterBase Driver + \row \li QMYSQL \li MySQL Driver + \row \li QOCI \li Oracle Call Interface Driver + \row \li QODBC \li ODBC Driver (includes Microsoft SQL Server) + \row \li QPSQL \li PostgreSQL Driver + \row \li QSQLITE \li SQLite version 3 or above + \row \li QSQLITE2 \li SQLite version 2 + \row \li QTDS \li Sybase Adaptive Server \endtable Additional third party drivers, including your own custom @@ -1202,77 +1202,77 @@ QSqlRecord QSqlDatabase::record(const QString& tablename) const database client used: \table - \header \i ODBC \i MySQL \i PostgreSQL + \header \li ODBC \li MySQL \li PostgreSQL \row - \i + \li \list - \i SQL_ATTR_ACCESS_MODE - \i SQL_ATTR_LOGIN_TIMEOUT - \i SQL_ATTR_CONNECTION_TIMEOUT - \i SQL_ATTR_CURRENT_CATALOG - \i SQL_ATTR_METADATA_ID - \i SQL_ATTR_PACKET_SIZE - \i SQL_ATTR_TRACEFILE - \i SQL_ATTR_TRACE - \i SQL_ATTR_CONNECTION_POOLING - \i SQL_ATTR_ODBC_VERSION + \li SQL_ATTR_ACCESS_MODE + \li SQL_ATTR_LOGIN_TIMEOUT + \li SQL_ATTR_CONNECTION_TIMEOUT + \li SQL_ATTR_CURRENT_CATALOG + \li SQL_ATTR_METADATA_ID + \li SQL_ATTR_PACKET_SIZE + \li SQL_ATTR_TRACEFILE + \li SQL_ATTR_TRACE + \li SQL_ATTR_CONNECTION_POOLING + \li SQL_ATTR_ODBC_VERSION \endlist - \i + \li \list - \i CLIENT_COMPRESS - \i CLIENT_FOUND_ROWS - \i CLIENT_IGNORE_SPACE - \i CLIENT_SSL - \i CLIENT_ODBC - \i CLIENT_NO_SCHEMA - \i CLIENT_INTERACTIVE - \i UNIX_SOCKET - \i MYSQL_OPT_RECONNECT + \li CLIENT_COMPRESS + \li CLIENT_FOUND_ROWS + \li CLIENT_IGNORE_SPACE + \li CLIENT_SSL + \li CLIENT_ODBC + \li CLIENT_NO_SCHEMA + \li CLIENT_INTERACTIVE + \li UNIX_SOCKET + \li MYSQL_OPT_RECONNECT \endlist - \i + \li \list - \i connect_timeout - \i options - \i tty - \i requiressl - \i service + \li connect_timeout + \li options + \li tty + \li requiressl + \li service \endlist - \header \i DB2 \i OCI \i TDS + \header \li DB2 \li OCI \li TDS \row - \i + \li \list - \i SQL_ATTR_ACCESS_MODE - \i SQL_ATTR_LOGIN_TIMEOUT + \li SQL_ATTR_ACCESS_MODE + \li SQL_ATTR_LOGIN_TIMEOUT \endlist - \i + \li \list - \i OCI_ATTR_PREFETCH_ROWS - \i OCI_ATTR_PREFETCH_MEMORY + \li OCI_ATTR_PREFETCH_ROWS + \li OCI_ATTR_PREFETCH_MEMORY \endlist - \i + \li \e none - \header \i SQLite \i Interbase + \header \li SQLite \li Interbase \row - \i + \li \list - \i QSQLITE_BUSY_TIMEOUT - \i QSQLITE_OPEN_READONLY - \i QSQLITE_ENABLE_SHARED_CACHE + \li QSQLITE_BUSY_TIMEOUT + \li QSQLITE_OPEN_READONLY + \li QSQLITE_ENABLE_SHARED_CACHE \endlist - \i + \li \list - \i ISC_DPB_LC_CTYPE - \i ISC_DPB_SQL_ROLE_NAME + \li ISC_DPB_LC_CTYPE + \li ISC_DPB_SQL_ROLE_NAME \endlist \endtable @@ -1354,47 +1354,47 @@ bool QSqlDatabase::isDriverAvailable(const QString& name) and their constructor arguments: \table - \header \i Driver \i Class name \i Constructor arguments \i File to include + \header \li Driver \li Class name \li Constructor arguments \li File to include \row - \i QPSQL - \i QPSQLDriver - \i PGconn *connection - \i \c qsql_psql.cpp + \li QPSQL + \li QPSQLDriver + \li PGconn *connection + \li \c qsql_psql.cpp \row - \i QMYSQL - \i QMYSQLDriver - \i MYSQL *connection - \i \c qsql_mysql.cpp + \li QMYSQL + \li QMYSQLDriver + \li MYSQL *connection + \li \c qsql_mysql.cpp \row - \i QOCI - \i QOCIDriver - \i OCIEnv *environment, OCISvcCtx *serviceContext - \i \c qsql_oci.cpp + \li QOCI + \li QOCIDriver + \li OCIEnv *environment, OCISvcCtx *serviceContext + \li \c qsql_oci.cpp \row - \i QODBC - \i QODBCDriver - \i SQLHANDLE environment, SQLHANDLE connection - \i \c qsql_odbc.cpp + \li QODBC + \li QODBCDriver + \li SQLHANDLE environment, SQLHANDLE connection + \li \c qsql_odbc.cpp \row - \i QDB2 - \i QDB2 - \i SQLHANDLE environment, SQLHANDLE connection - \i \c qsql_db2.cpp + \li QDB2 + \li QDB2 + \li SQLHANDLE environment, SQLHANDLE connection + \li \c qsql_db2.cpp \row - \i QTDS - \i QTDSDriver - \i LOGINREC *loginRecord, DBPROCESS *dbProcess, const QString &hostName - \i \c qsql_tds.cpp + \li QTDS + \li QTDSDriver + \li LOGINREC *loginRecord, DBPROCESS *dbProcess, const QString &hostName + \li \c qsql_tds.cpp \row - \i QSQLITE - \i QSQLiteDriver - \i sqlite *connection - \i \c qsql_sqlite.cpp + \li QSQLITE + \li QSQLiteDriver + \li sqlite *connection + \li \c qsql_sqlite.cpp \row - \i QIBASE - \i QIBaseDriver - \i isc_db_handle connection - \i \c qsql_ibase.cpp + \li QIBASE + \li QIBaseDriver + \li isc_db_handle connection + \li \c qsql_ibase.cpp \endtable The host name (or service name) is needed when constructing the diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp index 861cd4ad0f..7e6a7f7386 100644 --- a/src/sql/kernel/qsqldriver.cpp +++ b/src/sql/kernel/qsqldriver.cpp @@ -569,22 +569,22 @@ QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName, \list - \i If \a field is character data, the value is returned enclosed + \li If \a field is character data, the value is returned enclosed in single quotation marks, which is appropriate for many SQL databases. Any embedded single-quote characters are escaped (replaced with two single-quote characters). If \a trimStrings is true (the default is false), all trailing whitespace is trimmed from the field. - \i If \a field is date/time data, the value is formatted in ISO + \li If \a field is date/time data, the value is formatted in ISO format and enclosed in single quotation marks. If the date/time data is invalid, "NULL" is returned. - \i If \a field is \link QByteArray bytearray\endlink data, and the + \li If \a field is \link QByteArray bytearray\endlink data, and the driver can edit binary fields, the value is formatted as a hexadecimal string. - \i For any other field type, toString() is called on its value + \li For any other field type, toString() is called on its value and the result of this is returned. \endlist diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp index 3e6712b27e..e21a8f4956 100644 --- a/src/sql/kernel/qsqlquery.cpp +++ b/src/sql/kernel/qsqlquery.cpp @@ -130,11 +130,11 @@ QSqlQueryPrivate::~QSqlQueryPrivate() Navigating records is performed with the following functions: \list - \o next() - \o previous() - \o first() - \o last() - \o seek() + \li next() + \li previous() + \li first() + \li last() + \li seek() \endlist These functions allow the programmer to move forward, backward @@ -188,23 +188,23 @@ QSqlQueryPrivate::~QSqlQueryPrivate() different binding approaches, as well as one example of binding values to a stored procedure. - \bold{Named binding using named placeholders:} + \b{Named binding using named placeholders:} \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 9 - \bold{Positional binding using named placeholders:} + \b{Positional binding using named placeholders:} \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 10 - \bold{Binding values using positional placeholders (version 1):} + \b{Binding values using positional placeholders (version 1):} \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 11 - \bold{Binding values using positional placeholders (version 2):} + \b{Binding values using positional placeholders (version 2):} \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 12 - \bold{Binding values to a stored procedure:} + \b{Binding values to a stored procedure:} This code calls a stored procedure called \c AsciiToInt(), passing it a character through its in parameter, and taking its result in @@ -460,10 +460,10 @@ const QSqlResult* QSqlQuery::result() const \list - \o If \a index is negative, the result is positioned before the + \li If \a index is negative, the result is positioned before the first record and false is returned. - \o Otherwise, an attempt is made to move to the record at position + \li Otherwise, an attempt is made to move to the record at position \a index. If the record at position \a index 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. @@ -474,18 +474,18 @@ const QSqlResult* QSqlQuery::result() const \list - \o If the result is currently positioned before the first record or + \li If the result is currently positioned before the first record or on the first record, and \a index is negative, there is no change, and false is returned. - \o If the result is currently located after the last record, and \a + \li If the result is currently located after the last record, and \a index is positive, there is no change, and false is returned. - \o If the result is currently located somewhere in the middle, and + \li If the result is currently located somewhere in the middle, and the relative offset \a index moves the result below zero, the result is positioned before the first record and false is returned. - \o Otherwise, an attempt is made to move to the record \a index + \li Otherwise, an attempt is made to move to the record \a index records ahead of the current record (or \a index records behind the current record if \a index is negative). If the record at offset \a index could not be retrieved, the result is positioned after the @@ -571,14 +571,14 @@ bool QSqlQuery::seek(int index, bool relative) \list - \o If the result is currently located before the first record, + \li 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. - \o If the result is currently located after the last record, there + \li If the result is currently located after the last record, there is no change and false is returned. - \o If the result is located somewhere in the middle, an attempt is + \li If the result is located somewhere in the middle, an attempt is made to retrieve the next record. \endlist @@ -621,13 +621,13 @@ bool QSqlQuery::next() \list - \o If the result is currently located before the first record, there + \li If the result is currently located before the first record, there is no change and false is returned. - \o If the result is currently located after the last record, an + \li If the result is currently located after the last record, an attempt is made to retrieve the last record. - \o If the result is somewhere in the middle, an attempt is made to + \li If the result is somewhere in the middle, an attempt is made to retrieve the previous record. \endlist diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index 8dd18ca1d0..3a521deea2 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -331,8 +331,8 @@ void QSqlRelationalTableModelPrivate::clearCache() columns to be set as foreign keys into other database tables. \table - \row \o \inlineimage noforeignkeys.png - \o \inlineimage foreignkeys.png + \row \li \inlineimage noforeignkeys.png + \li \inlineimage foreignkeys.png \endtable The screenshot on the left shows a plain QSqlTableModel in a @@ -375,14 +375,14 @@ void QSqlRelationalTableModelPrivate::clearCache() Notes: \list - \o The table must have a primary key declared. - \o The table's primary key may not contain a relation to + \li The table must have a primary key declared. + \li The table's primary key may not contain a relation to another table. - \o If a relational table contains keys that refer to non-existent + \li If a relational table contains keys that refer to non-existent rows in the referenced table, the rows containing the invalid keys will not be exposed through the model. The user or the database is responsible for keeping referential integrity. - \o If a relation's display column name is also used as a column + \li If a relation's display column name is also used as a column name in the main table, or if it is used as display column name in more than one relation it will be aliased. The alias is is the relation's table name and display column name joined @@ -393,7 +393,7 @@ void QSqlRelationalTableModelPrivate::clearCache() QSqlRelation, so QSqlRelation::displayColumn() will return the original display column name, but QSqlRecord::fieldName() will return aliases. - \o When using setData() the role should always be Qt::EditRole, + \li When using setData() the role should always be Qt::EditRole, and when using data() the role should always be Qt::DisplayRole. \endlist |