C++ Web Framework  3.0
Classes | Public Member Functions | List of all members
SqlDatabaseStorage Class Reference

The SqlDatabaseStorage class allows you to reuse connections made to the database through the QSqlDatabase class within QThreadPool. More...

#include <sqldatabasestorage.h>

Public Member Functions

 SqlDatabaseStorage (const QString &type="", const QString &hostName="", const QString &databaseName="", const QString &userName="", const QString &password="", int port=0)
 This constructor receives informations to create a connection to the database. More...
 
QString getType () const
 Returns the type.
 
QString getPassword () const
 Returns the password.
 
QString getHostName () const
 Returns the host name.
 
QString getDatabaseName () const
 Returns the database's name.
 
QString getUserName () const
 Returns the user's name.
 
int getPort () const
 Returns the port.
 
QSqlDatabase & getDatabase ()
 Returns the existing connection to the current thread's database. If there is no open connection to the current thread, a new connection will be created and returned.
 

Detailed Description

The SqlDatabaseStorage class allows you to reuse connections made to the database through the QSqlDatabase class within QThreadPool.

Constructor & Destructor Documentation

◆ SqlDatabaseStorage()

SqlDatabaseStorage::SqlDatabaseStorage ( const QString &  type = "",
const QString &  hostName = "",
const QString &  databaseName = "",
const QString &  userName = "",
const QString &  password = "",
int  port = 0 
)
inline

This constructor receives informations to create a connection to the database.

Parameters
constQString &type : Driver type.
constQString &hostName : Sets the connection's host name to host.
constQString &databaseName : Sets the connection's database name to name.
constQString &userName : Sets the connection's user name to name.
constQString &password : Sets the connection's password to password.
intport : Sets the connection's port number to port.

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