QSqlDatabase

#include <QtSql/QSqlDatabase>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QSqlDatabase


Overview

Public Attributes Index

QT_STATIC_CONST char *defaultConnection

Public Functions Index

QSqlDatabase ()
QSqlDatabase (const QSqlDatabase &other)
~QSqlDatabase ()
voidclose ()
boolcommit ()
QStringconnectionName () const
QStringconnectOptions () const
QStringdatabaseName () const
QSqlDriver *driver () const
QStringdriverName () const
QSqlQueryexec (const QString &query=QString()) const
QStringhostName () const
boolisOpen () const
boolisOpenError () const
boolisValid () const
QSqlErrorlastError () const
QSql::NumericalPrecisionPolicynumericalPrecisionPolicy () const
boolopen ()
boolopen (const QString &user, const QString &password)
QSqlDatabase &operator= (const QSqlDatabase &other)
QStringpassword () const
intport () const
QSqlIndexprimaryIndex (const QString &tablename) const
QSqlRecordrecord (const QString &tablename) const
boolrollback ()
voidsetConnectOptions (const QString &options=QString())
voidsetDatabaseName (const QString &name)
voidsetHostName (const QString &host)
voidsetNumericalPrecisionPolicy (QSql::NumericalPrecisionPolicy precisionPolicy)
voidsetPassword (const QString &password)
voidsetPort (int p)
voidsetUserName (const QString &name)
QStringListtables (QSql::TableType type=QSql::Tables) const
booltransaction ()
QStringuserName () const

Static Public Functions Index

QSqlDatabaseaddDatabase (const QString &type, const QString &connectionName=QLatin1String(defaultConnection))
QSqlDatabaseaddDatabase (QSqlDriver *driver, const QString &connectionName=QLatin1String(defaultConnection))
QSqlDatabasecloneDatabase (const QSqlDatabase &other, const QString &connectionName)
QStringListconnectionNames ()
boolcontains (const QString &connectionName=QLatin1String(defaultConnection))
QSqlDatabasedatabase (const QString &connectionName=QLatin1String(defaultConnection), bool open=true)
QStringListdrivers ()
boolisDriverAvailable (const QString &name)
voidregisterSqlDriver (const QString &name, QSqlDriverCreatorBase *creator)
voidremoveDatabase (const QString &connectionName)

Protected Functions Index

QSqlDatabase (const QString &type)
QSqlDatabase (QSqlDriver *driver)

Public Attributes

QT_STATIC_CONST char * defaultConnection ()

Public Functions

QSqlDatabase ()

QSqlDatabase (

~QSqlDatabase ()

Destructor.

void close ()

bool commit ()

QString connectionName ()

QString connectOptions ()

QString databaseName ()

QSqlDriver * driver ()

QString driverName ()

QSqlQuery exec (

QString hostName ()

bool isOpen ()

bool isOpenError ()

bool isValid ()

QSqlError lastError ()

QSql::NumericalPrecisionPolicy numericalPrecisionPolicy ()

bool open ()

bool open (

QSqlDatabase & operator= (

QString password ()

int port ()

QSqlIndex primaryIndex (

QSqlRecord record (

bool rollback ()

void setConnectOptions (

void setDatabaseName (

void setHostName (

void setNumericalPrecisionPolicy (
  • QSql::NumericalPrecisionPolicyprecisionPolicy)

void setPassword (

void setPort (
  • intp)

void setUserName (

QStringList tables (
  • QSql::TableTypetype)

bool transaction ()

QString userName ()

Static Public Functions

QSqlDatabase addDatabase (

QSqlDatabase addDatabase (

QSqlDatabase cloneDatabase (

QStringList connectionNames ()

bool contains (

QSqlDatabase database (
  • const QString &connectionName,
  • boolopen )

QStringList drivers ()

bool isDriverAvailable (

void registerSqlDriver (

void removeDatabase (

Protected Functions

QSqlDatabase (

QSqlDatabase (

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus