Kexi API Documentation (2.0 alpha)

KexiMigration::PqxxMigrate Class Reference

#include <pqxxmigrate.h>

Inheritance diagram for KexiMigration::PqxxMigrate:

KexiMigration::KexiMigrate KexiDB::Object List of all members.

Public Member Functions

 PqxxMigrate (QObject *parent, const char *name, const QStringList &args=QStringList())
virtual ~PqxxMigrate ()

Protected Member Functions

virtual bool drv_tableNames (QStringList &tablenames)
 Get table names in source database (driver specific).
virtual bool drv_readTableSchema (const QString &originalName, KexiDB::TableSchema &tableSchema)
 Read schema for a given table (driver specific).
virtual bool drv_connect ()
 Connect to source database (driver specific).
virtual bool drv_disconnect ()
 Disconnect from source database (driver specific).
virtual tristate drv_queryStringListFromSQL (const QString &sqlStatement, uint columnNumber, QStringList &stringList, int numRecords=-1)
virtual tristate drv_fetchRecordFromSQL (const QString &sqlStatement, KexiDB::RowData &data, bool &firstRecord)
virtual bool drv_copyTable (const QString &srcTable, KexiDB::Connection *destConn, KexiDB::TableSchema *dstTable)

Constructor & Destructor Documentation

PqxxMigrate::PqxxMigrate QObject *  parent,
const char *  name,
const QStringList &  args = QStringList()
 

Definition at line 60 of file pqxxmigrate.cpp.

References KexiDB::DriverManager::driver().

PqxxMigrate::~PqxxMigrate  )  [virtual]
 

Definition at line 71 of file pqxxmigrate.cpp.


Member Function Documentation

bool PqxxMigrate::drv_connect  )  [protected, virtual]
 

Connect to source database (driver specific).

Implements KexiMigration::KexiMigrate.

Definition at line 192 of file pqxxmigrate.cpp.

References KexiDB::ConnectionData::fileName(), KexiDB::ConnectionDataBase::hostName, KexiMigration::KexiMigrate::m_migrateData, KexiDB::ConnectionDataBase::password, KexiDB::ConnectionDataBase::port, KexiMigration::Data::source, KexiMigration::Data::sourceName, and KexiDB::ConnectionDataBase::userName.

bool PqxxMigrate::drv_copyTable const QString srcTable,
KexiDB::Connection destConn,
KexiDB::TableSchema dstTable
[protected, virtual]
 

Copy PostgreSQL table to KexiDB database

Implements KexiMigration::KexiMigrate.

Definition at line 523 of file pqxxmigrate.cpp.

References KexiDB::Field::BLOB, KexiDB::cstringToVariant(), KexiDB::Connection::insertRecord(), KexiDB::Field::LongText, KexiDB::pgsqlByteaToByteArray(), KexiDB::TableSchema::query(), and KexiMigration::KexiMigrate::updateProgress().

bool PqxxMigrate::drv_disconnect  )  [protected, virtual]
 

Disconnect from source database (driver specific).

Implements KexiMigration::KexiMigrate.

Definition at line 248 of file pqxxmigrate.cpp.

tristate PqxxMigrate::drv_fetchRecordFromSQL const QString sqlStatement,
KexiDB::RowData data,
bool &  firstRecord
[protected, virtual]
 

Fetches single record from result obtained by running sqlStatement. firstRecord should be first initialized to true, so the method can run the query at first call and then set it will set firstRecord to false, so subsequent calls will only fetch records. On success the result is stored in data and true is returned, data is resized to appropriate size. cancelled is returned on EOF.

Todo:
SQL-dependent!

Reimplemented from KexiMigration::KexiMigrate.

Definition at line 494 of file pqxxmigrate.cpp.

References cancelled, and KexiDB::pgsqlCStrToVariant().

tristate PqxxMigrate::drv_queryStringListFromSQL const QString sqlStatement,
uint  columnNumber,
QStringList &  stringList,
int  numRecords = -1
[protected, virtual]
 

Fetches single string at column columnNumber from result obtained by running sqlStatement. On success the result is stored in string and true is returned.

Returns:
cancelled if there are no records available.

Reimplemented from KexiMigration::KexiMigrate.

Definition at line 427 of file pqxxmigrate.cpp.

References cancelled.

bool PqxxMigrate::drv_readTableSchema const QString originalName,
KexiDB::TableSchema tableSchema
[protected, virtual]
 

Read schema for a given table (driver specific).

Implements KexiMigration::KexiMigrate.

Definition at line 80 of file pqxxmigrate.cpp.

References KexiDB::FieldList::addField(), KexiDB::Field::setAutoIncrement(), KexiDB::Field::setCaption(), KexiDB::Field::setPrimaryKey(), KexiDB::Field::setUniqueKey(), and KexiUtils::string2Identifier().

bool PqxxMigrate::drv_tableNames QStringList &  tablenames  )  [protected, virtual]
 

Get table names in source database (driver specific).

Implements KexiMigration::KexiMigrate.

Definition at line 127 of file pqxxmigrate.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:52 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003