vtkPostgreSQLQuery Class Reference

#include <vtkPostgreSQLQuery.h>

Inheritance diagram for vtkPostgreSQLQuery:

Inheritance graph
[legend]
Collaboration diagram for vtkPostgreSQLQuery:

Collaboration graph
[legend]

List of all members.


Detailed Description

vtkSQLQuery implementation for PostgreSQL databases

This is an implementation of vtkSQLQuery for PostgreSQL databases. See the documentation for vtkSQLQuery for information about what the methods do.

Bug:
The PostgreSQL adaptor classes use pqxx instead of libpq.
Thanks:
Thanks to David Thompson from Sandia National Laboratories for implementing this class. Thanks to Andrew Wilson for the SQLite example.
See also:
vtkSQLDatabase vtkSQLQuery vtkPostgreSQLDatabase

Definition at line 51 of file vtkPostgreSQLQuery.h.


Public Types

typedef vtkSQLQuery Superclass

Public Member Functions

void PrintSelf (ostream &os, vtkIndent indent)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
bool Execute ()
int GetNumberOfFields ()
const char * GetFieldName (int i)
int GetFieldType (int i)
bool NextRow ()
bool HasError ()
const char * GetLastErrorText ()
bool BeginTransaction ()
bool RollbackTransaction ()
bool CommitTransaction ()
vtkVariant DataValue (vtkIdType c)
virtual vtkStdString EscapeString (vtkStdString s, bool addSurroundingQuotes=true)

Static Public Member Functions

static vtkPostgreSQLQueryNew ()
static int IsTypeOf (const char *type)
static vtkPostgreSQLQuerySafeDownCast (vtkObject *o)

Protected Member Functions

 vtkPostgreSQLQuery ()
 ~vtkPostgreSQLQuery ()
void SetLastErrorText (const char *msg)

Protected Attributes

vtkPostgreSQLQueryPrivate * Transactor

Friends

class vtkPostgreSQLDatabase

Member Typedef Documentation

Reimplemented from vtkSQLQuery.

Definition at line 56 of file vtkPostgreSQLQuery.h.


Constructor & Destructor Documentation

vtkPostgreSQLQuery::vtkPostgreSQLQuery (  )  [protected]

vtkPostgreSQLQuery::~vtkPostgreSQLQuery (  )  [protected]


Member Function Documentation

static vtkPostgreSQLQuery* vtkPostgreSQLQuery::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

void vtkPostgreSQLQuery::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkSQLQuery.

virtual const char* vtkPostgreSQLQuery::GetClassName (  )  [virtual]

Reimplemented from vtkSQLQuery.

static int vtkPostgreSQLQuery::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkSQLQuery.

virtual int vtkPostgreSQLQuery::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkSQLQuery.

static vtkPostgreSQLQuery* vtkPostgreSQLQuery::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkSQLQuery.

bool vtkPostgreSQLQuery::Execute (  )  [virtual]

Execute the query. This must be performed before any field name or data access functions are used.

Implements vtkSQLQuery.

int vtkPostgreSQLQuery::GetNumberOfFields (  )  [virtual]

The number of fields in the query result.

Implements vtkRowQuery.

const char* vtkPostgreSQLQuery::GetFieldName ( int  i  )  [virtual]

Return the name of the specified query field.

Implements vtkRowQuery.

int vtkPostgreSQLQuery::GetFieldType ( int  i  )  [virtual]

Return the type of the field, using the constants defined in vtkType.h.

Implements vtkRowQuery.

bool vtkPostgreSQLQuery::NextRow (  )  [virtual]

Advance row, return false if past end.

Implements vtkRowQuery.

bool vtkPostgreSQLQuery::HasError (  )  [virtual]

Return true if there is an error on the current query.

Implements vtkRowQuery.

bool vtkPostgreSQLQuery::BeginTransaction (  )  [virtual]

Begin, abort (roll back), or commit a transaction.

Reimplemented from vtkSQLQuery.

bool vtkPostgreSQLQuery::RollbackTransaction (  )  [virtual]

Begin, abort (roll back), or commit a transaction.

Reimplemented from vtkSQLQuery.

bool vtkPostgreSQLQuery::CommitTransaction (  )  [virtual]

Begin, abort (roll back), or commit a transaction.

Reimplemented from vtkSQLQuery.

vtkVariant vtkPostgreSQLQuery::DataValue ( vtkIdType  c  )  [virtual]

Return data in current row, field c

Implements vtkRowQuery.

const char* vtkPostgreSQLQuery::GetLastErrorText (  )  [virtual]

Get the last error text from the query

Implements vtkRowQuery.

virtual vtkStdString vtkPostgreSQLQuery::EscapeString ( vtkStdString  s,
bool  addSurroundingQuotes = true 
) [virtual]

Escape a string for inclusion into an SQL query

Reimplemented from vtkSQLQuery.

void vtkPostgreSQLQuery::SetLastErrorText ( const char *  msg  )  [protected]


Friends And Related Function Documentation

friend class vtkPostgreSQLDatabase [friend]

Definition at line 111 of file vtkPostgreSQLQuery.h.


Member Data Documentation

vtkPostgreSQLQueryPrivate* vtkPostgreSQLQuery::Transactor [protected]

Definition at line 108 of file vtkPostgreSQLQuery.h.


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

Generated on Sat Dec 27 13:44:29 2008 for VTK by  doxygen 1.5.6