| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes
TePostgreSQLPortal Class Reference

PostgreSQL data navigation functionalities. More...

`#include <TePostgreSQL.h>`

Inheritance diagram for TePostgreSQLPortal:

List of all members.

## Public Member Functions

| TePostgreSQLPortal ()
| Constructor.
| TePostgreSQLPortal (TeDatabase *pDatabase)
| Constructor.
virtual | ~TePostgreSQLPortal ()
| Virtual Destructor.
virtual bool | query (const string &qry, TeCursorLocation l=TeSERVERSIDE, TeCursorType t=TeUNIDIRECTIONAL, TeCursorEditType e=TeREADONLY, TeCursorDataType dt=TeTEXTCURSOR)
| Executes a SQL query that opens a record set.
bool | fetchRow ()
| Fetchs the next row in a record set that shouldve been previously opened.
bool | fetchRow (int i)
| Fetchs a particular row.
void | freeResult ()
| Frees the current record set.
string | errorMessage ()
| Gets the last error message.
char * | getData (int i)
| Gets the value of the i-th attribute as a literal.
char * | getData (const string &s)
| Gets the value of a named attribute as a literal.
double | getDouble (int i)
| Gets the value of the i-th attribute a double.
double | getDouble (const string &s)
| Gets the value of a named attribute as a double.
int | getInt (int i)
| Gets the value of the i-th attribute as an integer.
int | getInt (const string &s)
| Gets the value of a named attribute as an integer.
bool | getBool (const string &s)
| Gets the value of a named attribute as a boolean.
bool | getBool (int i)
| Gets the value of the i-th attribute as a boolean.
TeTime | getDate (int i)
| Gets the value of the i-th attribute as a date.
TeTime | getDate (const string &s)
| Gets the value of a named attribute as a date.
string | getDateAsString (int i)
| Gets the of a date/time attribute as a string formatted as accepted in further SQL statements.
string | getDateAsString (const string &s)
| Gets the of a date/time attribute as a string formatted as accepted in further SQL statements.
bool | getBlob (const string &s, unsigned char *&data, long &size)
| Gets the value of a named BLOB attribute.
virtual bool | getRasterBlock (unsigned long &size, unsigned char *ptData)
virtual bool | fetchGeometry (TePolygon &pol)
virtual bool | fetchGeometry (TeLine2D &line)
virtual bool | fetchGeometry (TeNode &n)
virtual bool | fetchGeometry (TePoint &p)
virtual bool | fetchGeometry (TeCell &cell)
virtual bool | fetchGeometry (TePolygon &pol, const unsigned int &initIndex)
virtual bool | fetchGeometry (TeLine2D &line, const unsigned int &initIndex)
virtual bool | fetchGeometry (TeNode &n, const unsigned int &initIndex)
virtual bool | fetchGeometry (TePoint &p, const unsigned int &initIndex)
virtual bool | fetchGeometry (TeCell &cell, const unsigned int &initIndex)

## Protected Member Functions

TeLinearRing | getLinearRing (int &numberOfHoles)
| Return a linear ring and the number of holes in case of external ring.
TeLinearRing | getLinearRing (int &numberOfHoles, const unsigned int &i)
| Return a linear ring that begins in the portal i-th position and the number of holes in case of external ring.
string | escapeSequence (const string &from)
| Escape special characters in a string to be used in a SQL statement.

## Protected Attributes

TePGConnection * | con_
TePGRecordset * | tepg_recordset_
long | curRow_

## Detailed Description

PostgreSQL data navigation functionalities.

This class contains the implementation of common methods for TerraLib navigate throw data.

## Constructor & Destructor Documentation

TePostgreSQLPortal::TePostgreSQLPortal | ( |  | ) |

Constructor.

TePostgreSQLPortal::TePostgreSQLPortal | ( | TeDatabase * | pDatabase | ) |

Constructor.

TePostgreSQLPortal::~TePostgreSQLPortal | ( |  | ) | `[virtual]`

Virtual Destructor.

## Member Function Documentation

string TePostgreSQLPortal::errorMessage | ( |  | ) | `[virtual]`

Gets the last error message.

Reimplemented from TeDatabasePortal.

string TePostgreSQLPortal::escapeSequence | ( | const string & | from | ) | `[protected]`

Escape special characters in a string to be used in a SQL statement.

bool TePostgreSQLPortal::fetchGeometry | ( | TePolygon & | pol | ) | `[virtual]`

Implements TeDatabasePortal.

Reimplemented in TePostGISPortal.

bool TePostgreSQLPortal::fetchGeometry | ( | TeLine2D & | line | ) | `[virtual]`

Implements TeDatabasePortal.

Reimplemented in TePostGISPortal.

bool TePostgreSQLPortal::fetchGeometry | ( | TeNode & | n | ) | `[virtual]`

Implements TeDatabasePortal.

Reimplemented in TePostGISPortal.

bool TePostgreSQLPortal::fetchGeometry | ( | TePoint & | p | ) | `[virtual]`

Implements TeDatabasePortal.

Reimplemented in TePostGISPortal.

bool TePostgreSQLPortal::fetchGeometry | ( | TeNode & | n,
|  | const unsigned int & | initIndex
| ) |  | `[virtual]`

Reimplemented from TeDatabasePortal.

Reimplemented in TePostGISPortal.

bool TePostgreSQLPortal::fetchGeometry | ( | TeCell & | cell | ) | `[virtual]`

Reimplemented from TeDatabasePortal.

Reimplemented in TePostGISPortal.

bool TePostgreSQLPortal::fetchGeometry | ( | TePolygon & | pol,
|  | const unsigned int & | initIndex
| ) |  | `[virtual]`

Reimplemented from TeDatabasePortal.

Reimplemented in TePostGISPortal.

bool TePostgreSQLPortal::fetchGeometry | ( | TeLine2D & | line,
|  | const unsigned int & | initIndex
| ) |  | `[virtual]`

Reimplemented from TeDatabasePortal.

Reimplemented in TePostGISPortal.

bool TePostgreSQLPortal::fetchGeometry | ( | TePoint & | p,
|  | const unsigned int & | initIndex
| ) |  | `[virtual]`

Reimplemented from TeDatabasePortal.

Reimplemented in TePostGISPortal.

bool TePostgreSQLPortal::fetchGeometry | ( | TeCell & | cell,
|  | const unsigned int & | initIndex
| ) |  | `[virtual]`

Reimplemented from TeDatabasePortal.

Reimplemented in TePostGISPortal.

bool TePostgreSQLPortal::fetchRow | ( |  | ) | `[virtual]`

Fetchs the next row in a record set that shouldve been previously opened.

Implements TeDatabasePortal.

bool TePostgreSQLPortal::fetchRow | ( | int | i | ) | `[virtual]`

Fetchs a particular row.

Implements TeDatabasePortal.

void TePostgreSQLPortal::freeResult | ( | void |  | ) | `[virtual]`

Frees the current record set.

Implements TeDatabasePortal.

bool TePostgreSQLPortal::getBlob | ( | const string & | s,
|  | unsigned char *& | data,
|  | long & | size
| ) |  | `[virtual]`

Gets the value of a named BLOB attribute.

Implements TeDatabasePortal.

bool TePostgreSQLPortal::getBool | ( | const string & | s | ) | `[virtual]`

Gets the value of a named attribute as a boolean.

Implements TeDatabasePortal.

bool TePostgreSQLPortal::getBool | ( | int | i | ) | `[virtual]`

Gets the value of the i-th attribute as a boolean.

Implements TeDatabasePortal.

char * TePostgreSQLPortal::getData | ( | const string & | s | ) | `[virtual]`

Gets the value of a named attribute as a literal.

Implements TeDatabasePortal.

char * TePostgreSQLPortal::getData | ( | int | i | ) | `[virtual]`

Gets the value of the i-th attribute as a literal.

Implements TeDatabasePortal.

TeTime TePostgreSQLPortal::getDate | ( | int | i | ) | `[virtual]`

Gets the value of the i-th attribute as a date.

Implements TeDatabasePortal.

TeTime TePostgreSQLPortal::getDate | ( | const string & | s | ) | `[virtual]`

Gets the value of a named attribute as a date.

Implements TeDatabasePortal.

string TePostgreSQLPortal::getDateAsString | ( | const string & | s | ) | `[virtual]`

Gets the of a date/time attribute as a string formatted as accepted in further SQL statements.

Implements TeDatabasePortal.

string TePostgreSQLPortal::getDateAsString | ( | int | i | ) | `[virtual]`

Gets the of a date/time attribute as a string formatted as accepted in further SQL statements.

Implements TeDatabasePortal.

double TePostgreSQLPortal::getDouble | ( | int | i | ) | `[virtual]`

Gets the value of the i-th attribute a double.

Reimplemented from TeDatabasePortal.

double TePostgreSQLPortal::getDouble | ( | const string & | s | ) | `[virtual]`

Gets the value of a named attribute as a double.

Reimplemented from TeDatabasePortal.

int TePostgreSQLPortal::getInt | ( | const string & | s | ) | `[virtual]`

Gets the value of a named attribute as an integer.

Reimplemented from TeDatabasePortal.

int TePostgreSQLPortal::getInt | ( | int | i | ) | `[virtual]`

Gets the value of the i-th attribute as an integer.

Reimplemented from TeDatabasePortal.

TeLinearRing TePostgreSQLPortal::getLinearRing | ( | int & | numberOfHoles,
|  | const unsigned int & | i
| ) |  | `[protected]`

Return a linear ring that begins in the portal i-th position and the number of holes in case of external ring.

TeLinearRing TePostgreSQLPortal::getLinearRing | ( | int & | numberOfHoles | ) | `[protected]`

Return a linear ring and the number of holes in case of external ring.

bool TePostgreSQLPortal::getRasterBlock | ( | unsigned long & | size,
|  | unsigned char * | ptData
| ) |  | `[virtual]`

Implements TeDatabasePortal.

bool TePostgreSQLPortal::query | ( | const string & | qry,
|  | TeCursorLocation | l = `TeSERVERSIDE`,
|  | TeCursorType | t = `TeUNIDIRECTIONAL`,
|  | TeCursorEditType | e = `TeREADONLY`,
|  | TeCursorDataType | dt = `TeTEXTCURSOR`
| ) |  | `[virtual]`

Executes a SQL query that opens a record set.

Implements TeDatabasePortal.

## Member Data Documentation

TePGConnection* TePostgreSQLPortal::con_`[protected]`

long TePostgreSQLPortal::curRow_`[protected]`

TePGRecordset* TePostgreSQLPortal::tepg_recordset_`[protected]`

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/PostgreSQL/TePostgreSQL.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/PostgreSQL/TePostgreSQL.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines