Eneboo - Documentación para desarrolladores
Tipos públicos | Métodos públicos | Métodos protegidos
Referencia de la Clase QPSQLDriver

#include <qsql_psql.h>

Diagrama de herencias de QPSQLDriver
QSqlDriver FLSqlDriver QObject QObject QSqlDriver Qt Qt Qt Qt QObject QObject Qt Qt Qt Qt

Lista de todos los miembros.

Tipos públicos

enum  Protocol {
  Version6 = 6, Version7 = 7, Version71 = 8, Version73 = 9,
  Version74 = 10, Version8 = 11, Version81 = 12, Version82 = 13,
  Version83 = 14, Version84 = 15, Version9 = 16, Version91 = 17,
  Version6 = 6, Version7 = 7, Version71 = 8, Version73 = 9
}
enum  Protocol {
  Version6 = 6, Version7 = 7, Version71 = 8, Version73 = 9,
  Version74 = 10, Version8 = 11, Version81 = 12, Version82 = 13,
  Version83 = 14, Version84 = 15, Version9 = 16, Version91 = 17,
  Version6 = 6, Version7 = 7, Version71 = 8, Version73 = 9
}

Métodos públicos

 QPSQLDriver (QObject *parent=0, const char *name=0)
 QPSQLDriver (PGconn *conn, QObject *parent=0, const char *name=0)
 ~QPSQLDriver ()
bool hasFeature (DriverFeature f) const
bool open (const QString &db, const QString &user=QString::null, const QString &password=QString::null, const QString &host=QString::null, int port=-1)
void close ()
QSqlQuery createQuery () const
QStringList tables (const QString &user) const
QSqlIndex primaryIndex (const QString &tablename) const
QSqlRecord record (const QString &tablename) const
QSqlRecord record (const QSqlQuery &query) const
QSqlRecordInfo recordInfo (const QString &tablename) const
QSqlRecordInfo recordInfo (const QSqlQuery &query) const
Protocol protocol () const
PGconnconnection ()
QString formatValue (const QSqlField *field, bool trimStrings) const
bool open (const QString &db, const QString &user, const QString &password, const QString &host, int port, const QString &connOpts)
bool tryConnect (const QString &db, const QString &user=QString::null, const QString &password=QString::null, const QString &host=QString::null, int port=-1)
QString sqlCreateTable (FLTableMetaData *tmd)
QString formatValueLike (int t, const QVariant &v, const bool upper=false)
QString formatValue (int t, const QVariant &v, const bool upper=false)
QVariant nextSerialVal (const QString &table, const QString &field)
int atFrom (FLSqlCursor *cur)
bool alterTable (const QString &mtd1, const QString &mtd2, const QString &key=QString::null)
bool canSavePoint ()
bool savePoint (const QString &n)
bool releaseSavePoint (const QString &n)
bool rollbackSavePoint (const QString &n)
QStringList rowsLockeds (const QString &table, const QString &primaryKeyValue=QString::null)
QStringList locksStatus ()
QStringList detectLocks ()
QStringList detectRisksLocks (const QString &table=QString::null, const QString &primaryKeyValue=QString::null)
bool regenTable (const QString &n, FLTableMetaData *tmd)
int backendId () const
 QPSQLDriver (QObject *parent=0, const char *name=0)
 QPSQLDriver (PGconn *conn, QObject *parent=0, const char *name=0)
 ~QPSQLDriver ()
bool hasFeature (DriverFeature f) const
bool open (const QString &db, const QString &user=QString::null, const QString &password=QString::null, const QString &host=QString::null, int port=-1)
void close ()
QSqlQuery createQuery () const
QStringList tables (const QString &user) const
QSqlIndex primaryIndex (const QString &tablename) const
QSqlRecord record (const QString &tablename) const
QSqlRecord record (const QSqlQuery &query) const
QSqlRecordInfo recordInfo (const QString &tablename) const
QSqlRecordInfo recordInfo (const QSqlQuery &query) const
Protocol protocol () const
PGconnconnection ()
QString formatValue (const QSqlField *field, bool trimStrings) const
bool open (const QString &db, const QString &user, const QString &password, const QString &host, int port, const QString &connOpts)

Métodos protegidos

bool beginTransaction ()
bool commitTransaction ()
bool rollbackTransaction ()
bool beginTransaction ()
bool commitTransaction ()
bool rollbackTransaction ()

Documentación de las enumeraciones miembro de la clase

Valores de enumeraciones:
Version6 
Version7 
Version71 
Version73 
Version74 
Version8 
Version81 
Version82 
Version83 
Version84 
Version9 
Version91 
Version6 
Version7 
Version71 
Version73 
Valores de enumeraciones:
Version6 
Version7 
Version71 
Version73 
Version74 
Version8 
Version81 
Version82 
Version83 
Version84 
Version9 
Version91 
Version6 
Version7 
Version71 
Version73 

Documentación del constructor y destructor

QPSQLDriver::QPSQLDriver ( QObject parent = 0,
const char *  name = 0 
)
QPSQLDriver::QPSQLDriver ( PGconn conn,
QObject parent = 0,
const char *  name = 0 
)
QPSQLDriver::~QPSQLDriver ( )
QPSQLDriver::QPSQLDriver ( QObject parent = 0,
const char *  name = 0 
)
QPSQLDriver::QPSQLDriver ( PGconn conn,
QObject parent = 0,
const char *  name = 0 
)
QPSQLDriver::~QPSQLDriver ( )

Documentación de las funciones miembro

bool QPSQLDriver::alterTable ( const QString mtd1,
const QString mtd2,
const QString key = QString::null 
) [virtual]

Ver FLSqlDatabase::alterTable()

Reimplementado de FLSqlDriver.

int QPSQLDriver::atFrom ( FLSqlCursor cur) [virtual]

Ver FLSqlDatabase::atFrom()

Reimplementado de FLSqlDriver.

int QPSQLDriver::backendId ( ) const
bool QPSQLDriver::beginTransaction ( ) [protected, virtual]

Protected function which derived classes can reimplement to begin a transaction. If successful, return TRUE, otherwise return FALSE. The default implementation returns FALSE.

Ver también:
commitTransaction(), rollbackTransaction()

Reimplementado de QSqlDriver.

bool QPSQLDriver::beginTransaction ( ) [protected, virtual]

Protected function which derived classes can reimplement to begin a transaction. If successful, return TRUE, otherwise return FALSE. The default implementation returns FALSE.

Ver también:
commitTransaction(), rollbackTransaction()

Reimplementado de QSqlDriver.

bool QPSQLDriver::canSavePoint ( ) [virtual]
void QPSQLDriver::close ( void  ) [virtual]

Derived classes must reimplement this abstract virtual function in order to close the database connection. Return TRUE on success, FALSE on failure.

Ver también:
setOpen()

Implementa QSqlDriver.

void QPSQLDriver::close ( void  ) [virtual]

Derived classes must reimplement this abstract virtual function in order to close the database connection. Return TRUE on success, FALSE on failure.

Ver también:
setOpen()

Implementa QSqlDriver.

bool QPSQLDriver::commitTransaction ( ) [protected, virtual]

Protected function which derived classes can reimplement to commit a transaction. If successful, return TRUE, otherwise return FALSE. The default implementation returns FALSE.

Ver también:
beginTransaction(), rollbackTransaction()

Reimplementado de QSqlDriver.

bool QPSQLDriver::commitTransaction ( ) [protected, virtual]

Protected function which derived classes can reimplement to commit a transaction. If successful, return TRUE, otherwise return FALSE. The default implementation returns FALSE.

Ver también:
beginTransaction(), rollbackTransaction()

Reimplementado de QSqlDriver.

PGconn* QPSQLDriver::connection ( )
PGconn * QPSQLDriver::connection ( )
QSqlQuery QPSQLDriver::createQuery ( ) const [virtual]

Creates an empty SQL result on the database. Derived classes must reimplement this function and return a QSqlQuery object appropriate for their database to the caller.

Implementa QSqlDriver.

QSqlQuery QPSQLDriver::createQuery ( ) const [virtual]

Creates an empty SQL result on the database. Derived classes must reimplement this function and return a QSqlQuery object appropriate for their database to the caller.

Implementa QSqlDriver.

QStringList QPSQLDriver::detectLocks ( ) [virtual]

Ver FLSqlDatabase::detectLocks()

Reimplementado de FLSqlDriver.

QStringList QPSQLDriver::detectRisksLocks ( const QString table = QString::null,
const QString primaryKeyValue = QString::null 
) [virtual]
QString QPSQLDriver::formatValue ( int  t,
const QVariant v,
const bool  upper = false 
) [virtual]

Ver FLSqlDatabase::formatValue()

Reimplementado de FLSqlDriver.

QString QPSQLDriver::formatValue ( const QSqlField field,
bool  trimStrings 
) const [virtual]

Returns a string representation of the field value for the database. This is used, for example, when constructing INSERT and UPDATE statements.

The default implementation returns the value formatted as a string according to the following rules:

If field is NULL, nullText() is returned.

If 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 trimStrings is TRUE (the default is FALSE), all trailing whitespace is trimmed from the field.

If 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, nullText() is returned.

If field is bytearray data, and the driver can edit binary fields, the value is formatted as a hexadecimal string.

For any other field type toString() will be called on its value and the result returned.

Ver también:
QVariant::toString().

Reimplementado de QSqlDriver.

QString QPSQLDriver::formatValue ( const QSqlField field,
bool  trimStrings 
) const [virtual]

Returns a string representation of the field value for the database. This is used, for example, when constructing INSERT and UPDATE statements.

The default implementation returns the value formatted as a string according to the following rules:

If field is NULL, nullText() is returned.

If 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 trimStrings is TRUE (the default is FALSE), all trailing whitespace is trimmed from the field.

If 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, nullText() is returned.

If field is bytearray data, and the driver can edit binary fields, the value is formatted as a hexadecimal string.

For any other field type toString() will be called on its value and the result returned.

Ver también:
QVariant::toString().

Reimplementado de QSqlDriver.

QString QPSQLDriver::formatValueLike ( int  t,
const QVariant v,
const bool  upper = false 
) [virtual]
bool QPSQLDriver::hasFeature ( DriverFeature  f) const [virtual]

Returns TRUE if the driver supports feature f; otherwise returns FALSE.

Note that some databases need to be open() before this can be determined.

Ver también:
DriverFeature

Implementa QSqlDriver.

bool QPSQLDriver::hasFeature ( DriverFeature  f) const [virtual]

Returns TRUE if the driver supports feature f; otherwise returns FALSE.

Note that some databases need to be open() before this can be determined.

Ver también:
DriverFeature

Implementa QSqlDriver.

QStringList QPSQLDriver::locksStatus ( ) [virtual]

Ver FLSqlDatabase::locksStatus()

Reimplementado de FLSqlDriver.

QVariant QPSQLDriver::nextSerialVal ( const QString table,
const QString field 
) [virtual]
bool QPSQLDriver::open ( const QString db,
const QString user = QString::null,
const QString password = QString::null,
const QString host = QString::null,
int  port = -1 
) [virtual]

Derived classes must reimplement this abstract virtual function in order to open a database connection on database db, using user name user, password password, host host and port port.

The function must return TRUE on success and FALSE on failure.

Ver también:
setOpen()

Implementa QSqlDriver.

bool QPSQLDriver::open ( const QString db,
const QString user = QString::null,
const QString password = QString::null,
const QString host = QString::null,
int  port = -1 
) [virtual]

Derived classes must reimplement this abstract virtual function in order to open a database connection on database db, using user name user, password password, host host and port port.

The function must return TRUE on success and FALSE on failure.

Ver también:
setOpen()

Implementa QSqlDriver.

bool QPSQLDriver::open ( const QString db,
const QString user,
const QString password,
const QString host,
int  port,
const QString connOpts 
)

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Open a database connection on database db, using user name user, password password, host host, port port and connection options connOpts.

Returns TRUE on success and FALSE on failure.

Ver también:
setOpen()

Reimplementado de QSqlDriver.

bool QPSQLDriver::open ( const QString db,
const QString user,
const QString password,
const QString host,
int  port,
const QString connOpts 
)

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Open a database connection on database db, using user name user, password password, host host, port port and connection options connOpts.

Returns TRUE on success and FALSE on failure.

Ver también:
setOpen()

Reimplementado de QSqlDriver.

QSqlIndex QPSQLDriver::primaryIndex ( const QString tableName) const [virtual]

Returns the primary index for table tableName. Returns an empty QSqlIndex if the table doesn't have a primary index. The default implementation returns an empty index.

Reimplementado de QSqlDriver.

QSqlIndex QPSQLDriver::primaryIndex ( const QString tableName) const [virtual]

Returns the primary index for table tableName. Returns an empty QSqlIndex if the table doesn't have a primary index. The default implementation returns an empty index.

Reimplementado de QSqlDriver.

Protocol QPSQLDriver::protocol ( ) const [inline]
Protocol QPSQLDriver::protocol ( ) const [inline]
QSqlRecord QPSQLDriver::record ( const QSqlQuery query) const [virtual]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Returns a QSqlRecord populated with the names of the fields in the SQL query. The default implementation returns an empty record.

Reimplementado de QSqlDriver.

QSqlRecord QPSQLDriver::record ( const QSqlQuery query) const [virtual]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Returns a QSqlRecord populated with the names of the fields in the SQL query. The default implementation returns an empty record.

Reimplementado de QSqlDriver.

QSqlRecord QPSQLDriver::record ( const QString tableName) const [virtual]

Returns a QSqlRecord populated with the names of the fields in table tableName. If no such table exists, an empty record is returned. The default implementation returns an empty record.

Reimplementado de QSqlDriver.

QSqlRecord QPSQLDriver::record ( const QString tableName) const [virtual]

Returns a QSqlRecord populated with the names of the fields in table tableName. If no such table exists, an empty record is returned. The default implementation returns an empty record.

Reimplementado de QSqlDriver.

QSqlRecordInfo QPSQLDriver::recordInfo ( const QSqlQuery query) const [virtual]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Returns a QSqlRecordInfo object with meta data for the QSqlQuery query. Note that this overloaded function may return less information than the recordInfo() function which takes the name of a table as parameter.

Reimplementado de QSqlDriver.

QSqlRecordInfo QPSQLDriver::recordInfo ( const QString tablename) const [virtual]

Returns a QSqlRecordInfo object with meta data about the table tablename.

Reimplementado de QSqlDriver.

QSqlRecordInfo QPSQLDriver::recordInfo ( const QSqlQuery query) const [virtual]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Returns a QSqlRecordInfo object with meta data for the QSqlQuery query. Note that this overloaded function may return less information than the recordInfo() function which takes the name of a table as parameter.

Reimplementado de QSqlDriver.

QSqlRecordInfo QPSQLDriver::recordInfo ( const QString tablename) const [virtual]

Returns a QSqlRecordInfo object with meta data about the table tablename.

Reimplementado de QSqlDriver.

bool QPSQLDriver::regenTable ( const QString n,
FLTableMetaData tmd 
) [virtual]

Ver FLSqlDatabase::regenTable()

Reimplementado de FLSqlDriver.

bool QPSQLDriver::releaseSavePoint ( const QString n) [virtual]
bool QPSQLDriver::rollbackSavePoint ( const QString n) [virtual]
bool QPSQLDriver::rollbackTransaction ( ) [protected, virtual]

Protected function which derived classes can reimplement to rollback a transaction. If successful, return TRUE, otherwise return FALSE. The default implementation returns FALSE.

Ver también:
beginTransaction(), commitTransaction()

Reimplementado de QSqlDriver.

bool QPSQLDriver::rollbackTransaction ( ) [protected, virtual]

Protected function which derived classes can reimplement to rollback a transaction. If successful, return TRUE, otherwise return FALSE. The default implementation returns FALSE.

Ver también:
beginTransaction(), commitTransaction()

Reimplementado de QSqlDriver.

QStringList QPSQLDriver::rowsLockeds ( const QString table,
const QString primaryKeyValue = QString::null 
)
bool QPSQLDriver::savePoint ( const QString n) [virtual]

Ver FLSqlDatabase::savePoint()

Reimplementado de FLSqlDriver.

QString QPSQLDriver::sqlCreateTable ( FLTableMetaData tmd) [virtual]

Sentencia SQL especfica de la base de datos que soporta el controlador, necesaria para crear la tabla solicitada.

Parámetros:
tmdMetadatos con la descripcin de la tabla que se desea crear
Devuelve:
Sentencia SQL debidamente formateada para el tipo de base de datos soportada por el controlador

Reimplementado de FLSqlDriver.

QStringList QPSQLDriver::tables ( const QString tableType) const [virtual]

Returns a list of tables in the database. The default implementation returns an empty list.

The tableType argument describes what types of tables should be returned. Due to binary compatibility, the string contains the value of the enum QSql::TableTypes as text. An empty string should be treated as QSql::Tables for downward compatibility.

Ver también:
QSql::TableType

Reimplementado de QSqlDriver.

QStringList QPSQLDriver::tables ( const QString tableType) const [virtual]

Returns a list of tables in the database. The default implementation returns an empty list.

The tableType argument describes what types of tables should be returned. Due to binary compatibility, the string contains the value of the enum QSql::TableTypes as text. An empty string should be treated as QSql::Tables for downward compatibility.

Ver también:
QSql::TableType

Reimplementado de QSqlDriver.

bool QPSQLDriver::tryConnect ( const QString db,
const QString user = QString::null,
const QString password = QString::null,
const QString host = QString::null,
int  port = -1 
) [virtual]

Intentar realizar una conexin a una base de datos.

Si la base de datos no existe intenta crearla.

Parámetros:
databaseNombre de la base de datos a la que conectar
userUsuario
passwordContrasea
hostServidor de la base de datos
portPuerto TCP de conexin
Devuelve:
True si la conexin tuvo xito, false en caso contrario

Reimplementado de FLSqlDriver.


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'