Qt 4.8
|
The QSqlDatabase class represents a connection to a database. More...
#include <qsqldatabase.h>
Public Functions | |
void | close () |
Closes the database connection, freeing any resources acquired, and invalidating any existing QSqlQuery objects that are used with the database. More... | |
bool | commit () |
Commits a transaction to the database if the driver supports transactions and a transaction() has been started. More... | |
QString | connectionName () const |
Returns the connection name, which may be empty. More... | |
QString | connectOptions () const |
Returns the connection options string used for this connection. More... | |
QString | databaseName () const |
Returns the connection's database name, which may be empty. More... | |
QSqlDriver * | driver () const |
Returns the database driver used to access the database connection. More... | |
QString | driverName () const |
Returns the connection's driver name. More... | |
QSqlQuery | exec (const QString &query=QString()) const |
Executes a SQL statement on the database and returns a QSqlQuery object. More... | |
QString | hostName () const |
Returns the connection's host name; it may be empty. More... | |
bool | isOpen () const |
Returns true if the database connection is currently open; otherwise returns false. More... | |
bool | isOpenError () const |
Returns true if there was an error opening the database connection; otherwise returns false. More... | |
bool | isValid () const |
Returns true if the QSqlDatabase has a valid driver. More... | |
QSqlError | lastError () const |
Returns information about the last error that occurred on the database. More... | |
QSql::NumericalPrecisionPolicy | numericalPrecisionPolicy () const |
Returns the current default precision policy for the database connection. More... | |
bool | open () |
Opens the database connection using the current connection values. More... | |
bool | open (const QString &user, const QString &password) |
Opens the database connection using the given user name and password. More... | |
QSqlDatabase & | operator= (const QSqlDatabase &other) |
Assigns other to this object. More... | |
QString | password () const |
Returns the connection's password. More... | |
int | port () const |
Returns the connection's port number. More... | |
QSqlIndex | primaryIndex (const QString &tablename) const |
Returns the primary index for table tablename. More... | |
QSqlDatabase () | |
Creates an empty, invalid QSqlDatabase object. More... | |
QSqlDatabase (const QSqlDatabase &other) | |
Creates a copy of other. More... | |
QSqlRecord | record (const QString &tablename) const |
Returns a QSqlRecord populated with the names of all the fields in the table (or view) called tablename. More... | |
bool | rollback () |
Rolls back a transaction on the database, if the driver supports transactions and a transaction() has been started. More... | |
void | setConnectOptions (const QString &options=QString()) |
Sets database-specific options. More... | |
void | setDatabaseName (const QString &name) |
Sets the connection's database name to name. More... | |
void | setHostName (const QString &host) |
Sets the connection's host name to host. More... | |
void | setNumericalPrecisionPolicy (QSql::NumericalPrecisionPolicy precisionPolicy) |
Sets the default numerical precision policy used by queries created on this database connection to precisionPolicy. More... | |
void | setPassword (const QString &password) |
Sets the connection's password to password. More... | |
void | setPort (int p) |
Sets the connection's port number to port. More... | |
void | setUserName (const QString &name) |
Sets the connection's user name to name. More... | |
QStringList | tables (QSql::TableType type=QSql::Tables) const |
Returns a list of the database's tables, system tables and views, as specified by the parameter type. More... | |
bool | transaction () |
Begins a transaction on the database if the driver supports transactions. More... | |
QString | userName () const |
Returns the connection's user name; it may be empty. More... | |
~QSqlDatabase () | |
Destroys the object and frees any allocated resources. More... | |
Static Public Functions | |
static QSqlDatabase | addDatabase (const QString &type, const QString &connectionName=QLatin1String(defaultConnection)) |
Adds a database to the list of database connections using the driver type and the connection name connectionName. More... | |
static QSqlDatabase | addDatabase (QSqlDriver *driver, const QString &connectionName=QLatin1String(defaultConnection)) |
This overload is useful when you want to create a database connection with a driver you instantiated yourself. More... | |
static QSqlDatabase | cloneDatabase (const QSqlDatabase &other, const QString &connectionName) |
Clones the database connection other and and stores it as connectionName. More... | |
static QStringList | connectionNames () |
Returns a list containing the names of all connections. More... | |
static bool | contains (const QString &connectionName=QLatin1String(defaultConnection)) |
Returns true if the list of database connections contains connectionName; otherwise returns false. More... | |
static QSqlDatabase | database (const QString &connectionName=QLatin1String(defaultConnection), bool open=true) |
Returns the database connection called connectionName. More... | |
static QStringList | drivers () |
Returns a list of all the available database drivers. More... | |
static bool | isDriverAvailable (const QString &name) |
Returns true if a driver called name is available; otherwise returns false. More... | |
static void | registerSqlDriver (const QString &name, QSqlDriverCreatorBase *creator) |
This function registers a new SQL driver called name, within the SQL framework. More... | |
static void | removeDatabase (const QString &connectionName) |
Removes the database connection connectionName from the list of database connections. More... | |
Public Variables | |
QT_STATIC_CONST char * | defaultConnection |
Protected Functions | |
QSqlDatabase (const QString &type) | |
Creates a QSqlDatabase connection that uses the driver referred to by type. More... | |
QSqlDatabase (QSqlDriver *driver) | |
Creates a database connection using the given driver. More... | |
Properties | |
QSqlDatabasePrivate * | d |
Friends | |
class | QSqlDatabasePrivate |
The QSqlDatabase class represents a connection to a database.
The QSqlDatabase class provides an interface for accessing a database through a connection. An instance of QSqlDatabase represents the connection. The connection provides access to the database via one of the SQL Database Drivers::Supported Databases {supported database drivers}, which are derived from QSqlDriver. Alternatively, you can subclass your own database driver from QSqlDriver. See How to Write Your Own Database Driver for more information.
Create a connection (i.e., an instance of QSqlDatabase) by calling one of the static addDatabase() functions, where you specify SQL Database Drivers::Supported Databases {the driver or type of driver} to use (i.e., what kind of database will you access?) and a connection name. A connection is known by its own name, not by the name of the database it connects to. You can have multiple connections to one database. QSqlDatabase also supports the concept of a default connection, which is the unnamed connection. To create the default connection, don't pass the connection name argument when you call addDatabase(). Subsequently, when you call any static member function that takes the connection name argument, if you don't pass the connection name argument, the default connection is assumed. The following snippet shows how to create and open a default connection to a PostgreSQL database:
Once the QSqlDatabase object has been created, set the connection parameters with setDatabaseName(), setUserName(), setPassword(), setHostName(), setPort(), and setConnectOptions(). Then call open() to activate the physical connection to the database. The connection is not usable until you open it.
The connection defined above will be the default connection, because we didn't give a connection name to QSqlDatabase::addDatabase() . Subsequently, you can get the default connection by calling database() without the connection name argument:
QSqlDatabase is a value class. Changes made to a database connection via one instance of QSqlDatabase will affect other instances of QSqlDatabase that represent the same connection. Use cloneDatabase() to create an independent database connection based on an existing one.
If you create multiple database connections, specify a unique connection name for each one, when you call addDatabase(). Use database() with a connection name to get that connection. Use removeDatabase() with a connection name to remove a connection. QSqlDatabase outputs a warning if you try to remove a connection referenced by other QSqlDatabase objects. Use contains() to see if a given connection name is in the list of connections.
Once a connection is established, you can call tables() to get the list of tables in the database, call primaryIndex() to get a table's primary index, and call record() to get meta-information about a table's fields (e.g., field names).
If the driver supports transactions, use transaction() to start a transaction, and commit() or rollback() to complete it. Use QSqlDriver::hasFeature() to ask if the driver supports transactions.
If an error occurrs, lastError() will return information about it.
Get the names of the available SQL drivers with drivers(). Check for the presence of a particular driver with isDriverAvailable(). If you have created your own custom driver, you must register it with registerSqlDriver().
Definition at line 78 of file qsqldatabase.h.
QSqlDatabase::QSqlDatabase | ( | ) |
Creates an empty, invalid QSqlDatabase object.
Use addDatabase(), removeDatabase(), and database() to get valid QSqlDatabase objects.
Definition at line 729 of file qsqldatabase.cpp.
QSqlDatabase::QSqlDatabase | ( | const QSqlDatabase & | other | ) |
QSqlDatabase::~QSqlDatabase | ( | ) |
Destroys the object and frees any allocated resources.
Definition at line 838 of file qsqldatabase.cpp.
|
explicitprotected |
Creates a QSqlDatabase connection that uses the driver referred to by type.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
If the type is not recognized, the database connection will have no functionality.
The currently available driver types are:
Driver Type | Description |
QDB2 | IBM DB2 |
QIBASE | Borland InterBase Driver |
QMYSQL | MySQL Driver |
QOCI | Oracle Call Interface Driver |
QODBC | ODBC Driver (includes Microsoft SQL Server) |
QPSQL | PostgreSQL Driver |
QSQLITE | SQLite version 3 or above |
QSQLITE2 | SQLite version 2 |
QTDS | Sybase Adaptive Server |
Additional third party drivers, including your own custom drivers, can be loaded dynamically.
Definition at line 704 of file qsqldatabase.cpp.
|
explicitprotected |
Creates a database connection using the given driver.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 719 of file qsqldatabase.cpp.
|
static |
Adds a database to the list of database connections using the driver type and the connection name connectionName.
If there already exists a database connection called connectionName, that connection is removed.
The database connection is referred to by connectionName. The newly added database connection is returned.
If type is not available or could not be loaded, isValid() returns false.
If connectionName is not specified, the new connection becomes the default connection for the application, and subsequent calls to database() without the connection name argument will return the default connection. If a connectionName is provided here, use database(connectionName) to retrieve the connection.
Before using the connection, it must be initialized. e.g., call some or all of setDatabaseName(), setUserName(), setPassword(), setHostName(), setPort(), and setConnectOptions(), and, finally, open().
Definition at line 495 of file qsqldatabase.cpp.
Referenced by qmlsqldatabase_open_sync().
|
static |
This overload is useful when you want to create a database connection with a driver you instantiated yourself.
It might be your own database driver, or you might just need to instantiate one of the Qt drivers yourself. If you do this, it is recommended that you include the driver code in your application. For example, you can create a PostgreSQL connection with your own QPSQL driver like this:
The above code sets up a PostgreSQL connection and instantiates a QPSQLDriver object. Next, addDatabase() is called to add the connection to the known connections so that it can be used by the Qt SQL classes. When a driver is instantiated with a connection handle (or set of handles), Qt assumes that you have already opened the database connection.
qtdir
is the directory where Qt is installed. This will pull in the code that is needed to use the PostgreSQL client library and to instantiate a QPSQLDriver object, assuming that you have the PostgreSQL headers somewhere in your include search path.Remember that you must link your application against the database client library. Make sure the client library is in your linker's search path, and add lines like these to your .pro
file:
The method described works for all the supplied drivers. The only difference will be in the driver constructor arguments. Here is a table of the drivers included with Qt, their source code files, and their constructor arguments:
Driver | Class name | Constructor arguments | File to include |
QPSQL | QPSQLDriver | PGconn *connection | qsql_psql.cpp |
QMYSQL | QMYSQLDriver | MYSQL *connection | qsql_mysql.cpp |
QOCI | QOCIDriver | OCIEnv *environment, OCISvcCtx *serviceContext | qsql_oci.cpp |
QODBC | QODBCDriver | SQLHANDLE environment, SQLHANDLE connection | qsql_odbc.cpp |
QDB2 | QDB2 | SQLHANDLE environment, SQLHANDLE connection | qsql_db2.cpp |
QTDS | QTDSDriver | LOGINREC *loginRecord, DBPROCESS *dbProcess, const QString &hostName | qsql_tds.cpp |
QSQLITE | QSQLiteDriver | sqlite *connection | qsql_sqlite.cpp |
QIBASE | QIBaseDriver | isc_db_handle connection | qsql_ibase.cpp |
The host name (or service name) is needed when constructing the QTDSDriver for creating new connections for internal queries. This is to prevent blocking when several QSqlQuery objects are used simultaneously.
Definition at line 1441 of file qsqldatabase.cpp.
|
static |
Clones the database connection other and and stores it as connectionName.
All the settings from the original database, e.g. databaseName(), hostName(), etc., are copied across. Does nothing if other is an invalid database. Returns the newly created database connection.
Definition at line 1492 of file qsqldatabase.cpp.
void QSqlDatabase::close | ( | ) |
Closes the database connection, freeing any resources acquired, and invalidating any existing QSqlQuery objects that are used with the database.
This will also affect copies of this QSqlDatabase object.
Definition at line 914 of file qsqldatabase.cpp.
bool QSqlDatabase::commit | ( | ) |
Commits a transaction to the database if the driver supports transactions and a transaction() has been started.
Returns true
if the operation succeeded. Otherwise it returns false
.
false
if there is an active query using the database for a SELECT
. Make the query inactive before doing the commit.Call lastError() to get information about errors.
Definition at line 967 of file qsqldatabase.cpp.
Referenced by qmlsqldatabase_change_version(), and qmlsqldatabase_transaction_shared().
QString QSqlDatabase::connectionName | ( | ) | const |
Returns the connection name, which may be empty.
Definition at line 1514 of file qsqldatabase.cpp.
Referenced by qmlsqldatabase_change_version().
|
static |
Returns a list containing the names of all connections.
Definition at line 668 of file qsqldatabase.cpp.
Referenced by qmlsqldatabase_open_sync().
QString QSqlDatabase::connectOptions | ( | ) | const |
Returns the connection options string used for this connection.
The string may be empty.
Definition at line 1327 of file qsqldatabase.cpp.
|
static |
Returns true if the list of database connections contains connectionName; otherwise returns false.
Definition at line 653 of file qsqldatabase.cpp.
|
static |
Returns the database connection called connectionName.
The database connection must have been previously added with addDatabase(). If open is true (the default) and the database connection is not already open it is opened now. If no connectionName is specified the default connection is used. If connectionName does not exist in the list of databases, an invalid connection is returned.
Definition at line 519 of file qsqldatabase.cpp.
Referenced by qInit(), qmlsqldatabase_open_sync(), and QSqlTableModel::QSqlTableModel().
QString QSqlDatabase::databaseName | ( | ) | const |
Returns the connection's database name, which may be empty.
Definition at line 1107 of file qsqldatabase.cpp.
Referenced by operator<<().
QSqlDriver * QSqlDatabase::driver | ( | ) | const |
Returns the database driver used to access the database connection.
Definition at line 1170 of file qsqldatabase.cpp.
Referenced by QSqlTableModelPrivate::exec(), QSqlTableModelPrivate::nameToIndex(), QRelation::populateDictionary(), and qInit().
QString QSqlDatabase::driverName | ( | ) | const |
Returns the connection's driver name.
Definition at line 1147 of file qsqldatabase.cpp.
Referenced by cloneDatabase(), and operator<<().
|
static |
Returns a list of all the available database drivers.
Definition at line 565 of file qsqldatabase.cpp.
Referenced by QSqlDatabasePrivate::init().
Executes a SQL statement on the database and returns a QSqlQuery object.
Use lastError() to retrieve error information. If query is empty, an empty, invalid query is returned and lastError() is not affected.
Definition at line 855 of file qsqldatabase.cpp.
QString QSqlDatabase::hostName | ( | ) | const |
Returns the connection's host name; it may be empty.
Definition at line 1137 of file qsqldatabase.cpp.
Referenced by operator<<().
|
static |
Returns true if a driver called name is available; otherwise returns false.
Definition at line 1339 of file qsqldatabase.cpp.
bool QSqlDatabase::isOpen | ( | ) | const |
Returns true if the database connection is currently open; otherwise returns false.
Definition at line 924 of file qsqldatabase.cpp.
Referenced by QSqlDatabasePrivate::database(), operator<<(), and qmlsqldatabase_open_sync().
bool QSqlDatabase::isOpenError | ( | ) | const |
Returns true if there was an error opening the database connection; otherwise returns false.
Error information can be retrieved using the lastError() function.
Definition at line 935 of file qsqldatabase.cpp.
bool QSqlDatabase::isValid | ( | ) | const |
Returns true if the QSqlDatabase has a valid driver.
Example:
Definition at line 1454 of file qsqldatabase.cpp.
Referenced by cloneDatabase(), QSqlDatabasePrivate::database(), operator<<(), qInit(), and QSqlTableModel::QSqlTableModel().
QSqlError QSqlDatabase::lastError | ( | ) | const |
Returns information about the last error that occurred on the database.
Failures that occur in conjunction with an individual query are reported by QSqlQuery::lastError().
Definition at line 1185 of file qsqldatabase.cpp.
Referenced by QSqlDatabasePrivate::database().
QSql::NumericalPrecisionPolicy QSqlDatabase::numericalPrecisionPolicy | ( | ) | const |
Returns the current default precision policy for the database connection.
Definition at line 1557 of file qsqldatabase.cpp.
bool QSqlDatabase::open | ( | ) |
Opens the database connection using the current connection values.
Returns true on success; otherwise returns false. Error information can be retrieved using lastError().
Definition at line 874 of file qsqldatabase.cpp.
Referenced by QSqlDatabasePrivate::database(), and qmlsqldatabase_open_sync().
Opens the database connection using the given user name and password.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true on success; otherwise returns false. Error information can be retrieved using the lastError() function.
This function does not store the password it is given. Instead, the password is passed directly to the driver for opening the connection and it is then discarded.
Definition at line 897 of file qsqldatabase.cpp.
QSqlDatabase & QSqlDatabase::operator= | ( | const QSqlDatabase & | other | ) |
Assigns other to this object.
Definition at line 747 of file qsqldatabase.cpp.
QString QSqlDatabase::password | ( | ) | const |
Returns the connection's password.
If the password was not set with setPassword(), and if the password was given in the open() call, or if no password was used, an empty string is returned.
Definition at line 1127 of file qsqldatabase.cpp.
int QSqlDatabase::port | ( | ) | const |
Returns the connection's port number.
The value is undefined if the port number has not been set.
Definition at line 1158 of file qsqldatabase.cpp.
Referenced by operator<<().
Returns the primary index for table tablename.
If no primary index exists an empty QSqlIndex is returned.
Definition at line 1210 of file qsqldatabase.cpp.
Referenced by QSqlTableModelPrivate::initRecordAndPrimaryIndex().
QSqlRecord QSqlDatabase::record | ( | const QString & | tablename | ) | const |
Returns a QSqlRecord populated with the names of all the fields in the table (or view) called tablename.
The order in which the fields appear in the record is undefined. If no such table (or view) exists, an empty record is returned.
Definition at line 1223 of file qsqldatabase.cpp.
Referenced by QSqlTableModelPrivate::initRecordAndPrimaryIndex(), isValid(), and QSqlRelationalTableModel::selectStatement().
|
static |
This function registers a new SQL driver called name, within the SQL framework.
This is useful if you have a custom SQL driver and don't want to compile it as a plugin.
Example:
QSqlDatabase takes ownership of the creator pointer, so you mustn't delete it yourself.
Definition at line 634 of file qsqldatabase.cpp.
|
static |
Removes the database connection connectionName from the list of database connections.
Example:
The correct way to do it:
To remove the default connection, which may have been created with a call to addDatabase() not specifying a connection name, you can retrieve the default connection name by calling connectionName() on the database returned by database(). Note that if a default database hasn't been created an invalid database will be returned.
Definition at line 554 of file qsqldatabase.cpp.
bool QSqlDatabase::rollback | ( | ) |
Rolls back a transaction on the database, if the driver supports transactions and a transaction() has been started.
Returns true
if the operation succeeded. Otherwise it returns false
.
false
if there is an active query using the database for a SELECT
. Make the query inactive before doing the rollback.Call lastError() to get information about errors.
Definition at line 988 of file qsqldatabase.cpp.
Referenced by qmlsqldatabase_change_version(), and qmlsqldatabase_transaction_shared().
Sets database-specific options.
This must be done before the connection is opened or it has no effect (or you can close() the connection, call this function and open() the connection again).
The format of the options string is a semicolon separated list of option names or option=value pairs. The options depend on the database client used:
ODBC | MySQL | PostgreSQL | ||||||||||||||||||||||||
SQL_ATTR_ACCESS_MODE | SQL_ATTR_LOGIN_TIMEOUT | SQL_ATTR_CONNECTION_TIMEOUT | SQL_ATTR_CURRENT_CATALOG | SQL_ATTR_METADATA_ID | SQL_ATTR_PACKET_SIZE | SQL_ATTR_TRACEFILE | SQL_ATTR_TRACE | SQL_ATTR_CONNECTION_POOLING | SQL_ATTR_ODBC_VERSION | CLIENT_COMPRESS | CLIENT_FOUND_ROWS | CLIENT_IGNORE_SPACE | CLIENT_SSL | CLIENT_ODBC | CLIENT_NO_SCHEMA | CLIENT_INTERACTIVE | UNIX_SOCKET | MYSQL_OPT_RECONNECT | connect_timeout | options | tty | requiressl | service | |||
DB2 | OCI | TDS | ||||||||||||||||||||||||
SQL_ATTR_ACCESS_MODE | SQL_ATTR_LOGIN_TIMEOUT | OCI_ATTR_PREFETCH_ROWS | OCI_ATTR_PREFETCH_MEMORY | none | ||||||||||||||||||||||
SQLite | Interbase | |||||||||||||||||||||||||
QSQLITE_BUSY_TIMEOUT | QSQLITE_OPEN_READONLY | QSQLITE_ENABLE_SHARED_CACHE | ISC_DPB_LC_CTYPE | ISC_DPB_SQL_ROLE_NAME |
Examples:
Refer to the client library documentation for more information about the different options.
Definition at line 1315 of file qsqldatabase.cpp.
void QSqlDatabase::setDatabaseName | ( | const QString & | name | ) |
Sets the connection's database name to name.
To have effect, the database name must be set before the connection is opened. Alternatively, you can close() the connection, set the database name, and call open() again.
For the QOCI (Oracle) driver, the database name is the TNS Service Name.
For the QODBC driver, the name can either be a DSN, a DSN filename (in which case the file must have a .dsn extension), or a connection string.
For example, Microsoft Access users can use the following connection string to open an .mdb file directly, instead of having to create a DSN entry in the ODBC manager:
There is no default value.
Definition at line 1023 of file qsqldatabase.cpp.
Referenced by qmlsqldatabase_open_sync().
void QSqlDatabase::setHostName | ( | const QString & | host | ) |
Sets the connection's host name to host.
To have effect, the host name must be set before the connection is opened. Alternatively, you can close() the connection, set the host name, and call open() again.
There is no default value.
Definition at line 1078 of file qsqldatabase.cpp.
void QSqlDatabase::setNumericalPrecisionPolicy | ( | QSql::NumericalPrecisionPolicy | precisionPolicy | ) |
Sets the default numerical precision policy used by queries created on this database connection to precisionPolicy.
Note: Drivers that don't support fetching numerical values with low precision will ignore the precision policy. You can use QSqlDriver::hasFeature() to find out whether a driver supports this feature.
Note: Setting the default precision policy to precisionPolicy doesn't affect any currently active queries.
Definition at line 1539 of file qsqldatabase.cpp.
void QSqlDatabase::setPassword | ( | const QString & | password | ) |
Sets the connection's password to password.
To have effect, the password must be set before the connection is opened. Alternatively, you can close() the connection, set the password, and call open() again.
There is no default value.
Definition at line 1061 of file qsqldatabase.cpp.
void QSqlDatabase::setPort | ( | int | port | ) |
Sets the connection's port number to port.
To have effect, the port number must be set before the connection is opened. Alternatively, you can close() the connection, set the port number, and call open() again..
There is no default value.
Definition at line 1095 of file qsqldatabase.cpp.
void QSqlDatabase::setUserName | ( | const QString & | name | ) |
Sets the connection's user name to name.
To have effect, the user name must be set before the connection is opened. Alternatively, you can close() the connection, set the user name, and call open() again.
There is no default value.
Definition at line 1040 of file qsqldatabase.cpp.
QStringList QSqlDatabase::tables | ( | QSql::TableType | type = QSql::Tables | ) | const |
Returns a list of the database's tables, system tables and views, as specified by the parameter type.
Definition at line 1198 of file qsqldatabase.cpp.
bool QSqlDatabase::transaction | ( | ) |
Begins a transaction on the database if the driver supports transactions.
Returns true
if the operation succeeded. Otherwise it returns false
.
Definition at line 947 of file qsqldatabase.cpp.
Referenced by qmlsqldatabase_change_version(), and qmlsqldatabase_transaction_shared().
QString QSqlDatabase::userName | ( | ) | const |
Returns the connection's user name; it may be empty.
Definition at line 1117 of file qsqldatabase.cpp.
Referenced by operator<<().
|
friend |
Definition at line 149 of file qsqldatabase.h.
|
private |
Definition at line 150 of file qsqldatabase.h.
Referenced by QSqlDatabasePrivate::addDatabase(), cloneDatabase(), QSqlDatabasePrivate::invalidateDb(), operator=(), and QSqlDatabase().
QT_STATIC_CONST char* QSqlDatabase::defaultConnection |
Definition at line 128 of file qsqldatabase.h.
Referenced by qInit().