VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
vtkPostgreSQLQuery Class Reference

vtkSQLQuery implementation for PostgreSQL databases More...

#include <vtkPostgreSQLQuery.h>

Inheritance diagram for vtkPostgreSQLQuery:
Inheritance graph
[legend]
Collaboration diagram for vtkPostgreSQLQuery:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkSQLQuery Superclass

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkPostgreSQLQuery ()
 ~vtkPostgreSQLQuery ()
virtual void SetLastErrorText (const char *)
bool IsColumnBinary (int whichColumn)
const char * GetColumnRawData (int whichColumn)
void DeleteQueryResults ()

Protected Attributes

bool TransactionInProgress
char * LastErrorText
int CurrentRow
vtkPostgreSQLQueryPrivate * QueryInternals

Friends

class vtkPostgreSQLDatabase

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.

Thanks:
Thanks to David Thompson and Andy Wilson from Sandia National Laboratories for implementing this class.
See also:
vtkSQLDatabase vtkSQLQuery vtkPostgreSQLDatabase

Definition at line 49 of file vtkPostgreSQLQuery.h.


Member Typedef Documentation

Reimplemented from vtkSQLQuery.

Definition at line 54 of file vtkPostgreSQLQuery.h.


Constructor & Destructor Documentation


Member Function Documentation

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.

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 vtkTypeMacro 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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkSQLQuery.

Reimplemented from vtkSQLQuery.

virtual vtkObjectBase* vtkPostgreSQLQuery::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkSQLQuery.

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.

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.

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.

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

Reimplemented from vtkSQLQuery.

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

Reimplemented from vtkSQLQuery.

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

Reimplemented from vtkSQLQuery.

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.

Unlike some databases, Postgres can tell you right away how many rows are in the results of your query.

virtual void vtkPostgreSQLQuery::SetLastErrorText ( const char *  ) [protected, virtual]
bool vtkPostgreSQLQuery::IsColumnBinary ( int  whichColumn) [protected]
const char* vtkPostgreSQLQuery::GetColumnRawData ( int  whichColumn) [protected]

Friends And Related Function Documentation

friend class vtkPostgreSQLDatabase [friend]

Definition at line 114 of file vtkPostgreSQLQuery.h.


Member Data Documentation

Definition at line 105 of file vtkPostgreSQLQuery.h.

Definition at line 106 of file vtkPostgreSQLQuery.h.

Definition at line 107 of file vtkPostgreSQLQuery.h.

vtkPostgreSQLQueryPrivate* vtkPostgreSQLQuery::QueryInternals [protected]

Definition at line 109 of file vtkPostgreSQLQuery.h.


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