Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSqlDatabasePrivate Class Reference
+ Collaboration diagram for QSqlDatabasePrivate:

Public Member Functions

 QSqlDatabasePrivate (QSqlDriver *dr)
 
 QSqlDatabasePrivate (const QSqlDatabasePrivate &other)
 
 ~QSqlDatabasePrivate ()
 
void init (const QString &type)
 
void copy (const QSqlDatabasePrivate *other)
 
void disable ()
 

Static Public Member Functions

static QSqlDatabasePrivateshared_null ()
 
static QSqlDatabase database (const QString &name, bool open)
 
static void addDatabase (const QSqlDatabase &db, const QString &name)
 
static void removeDatabase (const QString &name)
 
static void invalidateDb (const QSqlDatabase &db, const QString &name, bool doWarn=true)
 
static DriverDict & driverDict ()
 
static void cleanConnections ()
 

Public Attributes

QAtomicInt ref
 
QSqlDriverdriver
 
QString dbname
 
QString uname
 
QString pword
 
QString hname
 
QString drvName
 
int port
 
QString connOptions
 
QString connName
 
QSql::NumericalPrecisionPolicy precisionPolicy
 

Detailed Description

Definition at line 58 of file qsqldatabase.cpp.

Constructor & Destructor Documentation

◆ QSqlDatabasePrivate() [1/2]

QSqlDatabasePrivate::QSqlDatabasePrivate ( QSqlDriver dr)
inline

Definition at line 61 of file qsqldatabase.cpp.

References QSql::LowPrecisionDouble.

◆ QSqlDatabasePrivate() [2/2]

QSqlDatabasePrivate::QSqlDatabasePrivate ( const QSqlDatabasePrivate other)

Definition at line 95 of file qsqldatabase.cpp.

References connOptions, dbname, driver, drvName, hname, other(), precisionPolicy, pword, QSqlDriver::setNumericalPrecisionPolicy(), and uname.

+ Here is the call graph for this function:

◆ ~QSqlDatabasePrivate()

QSqlDatabasePrivate::~QSqlDatabasePrivate ( )

Definition at line 110 of file qsqldatabase.cpp.

References driver, and shared_null().

+ Here is the call graph for this function:

Member Function Documentation

◆ addDatabase()

void QSqlDatabasePrivate::addDatabase ( const QSqlDatabase db,
const QString name 
)
static

Definition at line 170 of file qsqldatabase.cpp.

References QHash< Key, T >::contains(), db, QHash< Key, T >::insert(), invalidateDb(), QConnectionDict::lock, Q_ASSERT, qWarning, and QHash< Key, T >::take().

Referenced by QSqlDatabase::addDatabase(), QSqlDatabase::addDatabase(), and QSqlDatabase::cloneDatabase().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cleanConnections()

void QSqlDatabasePrivate::cleanConnections ( )
static

Definition at line 116 of file qsqldatabase.cpp.

References QHash< Key, T >::begin(), QHash< Key, T >::clear(), QHash< Key, T >::end(), invalidateDb(), it, QHash< QString, QSqlDatabase >::iterator, QConnectionDict::lock, and Q_ASSERT.

+ Here is the call graph for this function:

◆ copy()

void QSqlDatabasePrivate::copy ( const QSqlDatabasePrivate other)

Copies the connection data from other.

Definition at line 212 of file qsqldatabase.cpp.

References connOptions, dbname, driver, drvName, hname, other(), precisionPolicy, pword, QSqlDriver::setNumericalPrecisionPolicy(), and uname.

+ Here is the call graph for this function:

◆ database()

QSqlDatabase QSqlDatabasePrivate::database ( const QString name,
bool  open 
)
static

Definition at line 187 of file qsqldatabase.cpp.

References QThread::currentThread(), db, open(), Q_ASSERT, qWarning, and QConnectionDict::value_ts().

Referenced by QSqlDatabase::database().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ disable()

void QSqlDatabasePrivate::disable ( )

Definition at line 226 of file qsqldatabase.cpp.

References driver, and shared_null().

+ Here is the call graph for this function:

◆ driverDict()

DriverDict & QSqlDatabasePrivate::driverDict ( )
static

Definition at line 136 of file qsqldatabase.cpp.

Referenced by QSqlDatabase::drivers(), init(), and QSqlDatabase::registerSqlDriver().

+ Here is the caller graph for this function:

◆ init()

void QSqlDatabasePrivate::init ( const QString type)

Create the actual driver instance type.

Definition at line 641 of file qsqldatabase.cpp.

References driver, driverDict(), QSqlDatabase::drivers(), drvName, QCoreApplication::instance(), it, loader, lock, qWarning, and shared_null().

Referenced by QSqlDatabase::QSqlDatabase().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ invalidateDb()

void QSqlDatabasePrivate::invalidateDb ( const QSqlDatabase db,
const QString name,
bool  doWarn = true 
)
static

Definition at line 148 of file qsqldatabase.cpp.

References db, and qWarning.

Referenced by addDatabase(), cleanConnections(), and removeDatabase().

+ Here is the caller graph for this function:

◆ removeDatabase()

void QSqlDatabasePrivate::removeDatabase ( const QString name)
static

Definition at line 158 of file qsqldatabase.cpp.

References QHash< Key, T >::contains(), invalidateDb(), QConnectionDict::lock, Q_ASSERT, and QHash< Key, T >::take().

Referenced by QSqlDatabase::removeDatabase().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shared_null()

QSqlDatabasePrivate * QSqlDatabasePrivate::shared_null ( )
static

Definition at line 141 of file qsqldatabase.cpp.

Referenced by ~QSqlDatabasePrivate(), disable(), init(), and QSqlDatabase::isValid().

+ Here is the caller graph for this function:

Member Data Documentation

◆ connName

QString QSqlDatabasePrivate::connName

Definition at line 83 of file qsqldatabase.cpp.

Referenced by QSqlDatabase::connectionName().

◆ connOptions

◆ dbname

◆ driver

◆ drvName

QString QSqlDatabasePrivate::drvName

Definition at line 80 of file qsqldatabase.cpp.

Referenced by QSqlDatabasePrivate(), copy(), QSqlDatabase::driverName(), and init().

◆ hname

◆ port

int QSqlDatabasePrivate::port

◆ precisionPolicy

◆ pword

QString QSqlDatabasePrivate::pword

◆ ref

QAtomicInt QSqlDatabasePrivate::ref

◆ uname

QString QSqlDatabasePrivate::uname

The documentation for this class was generated from the following file: