| 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
TeMySQLPortal Class Reference

A concrete implementation of a portal to a MySQL database. More...

`#include <TeMySQL.h>`

Inheritance diagram for TeMySQLPortal:

List of all members.

## Public Member Functions

| TeMySQLPortal (TeMySQL *m)
| TeMySQLPortal (const TeMySQLPortal &p)
| ~TeMySQLPortal ()
int | insertId ()
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.
int | errorNum ()
| Gets the number of 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 as 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.
bool | fetchGeometry (TePolygon &pol)
bool | fetchGeometry (TeLine2D &line)
bool | fetchGeometry (TeNode &n)
bool | fetchGeometry (TePoint &p)
bool | fetchGeometry (TePolygon &pol, const unsigned int &initIndex)
bool | fetchGeometry (TeLine2D &line, const unsigned int &initIndex)
bool | fetchGeometry (TeNode &n, const unsigned int &initIndex)
bool | fetchGeometry (TePoint &p, const unsigned int &initIndex)
bool | setData (int, string)
st_mysql_res * | result ()
bool | getBlob (const string &s, unsigned char *&data, long &size)
| Gets the value of a named BLOB attribute.
bool | getRasterBlock (unsigned long &size, unsigned char *ptData)
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.

## Protected Member Functions

TeLinearRing | getLinearRing (int &ni)

## Detailed Description

A concrete implementation of a portal to a MySQL database.

## Constructor & Destructor Documentation

TeMySQLPortal::TeMySQLPortal | ( | TeMySQL * | m | ) |

TeMySQLPortal::TeMySQLPortal | ( | const TeMySQLPortal & | p | ) |

TeMySQLPortal::~TeMySQLPortal | ( |  | ) |

## Member Function Documentation

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

Gets the last error message.

Reimplemented from TeDatabasePortal.

int TeMySQLPortal::errorNum | ( |  | ) | `[virtual]`

Gets the number of the last error message.

Reimplemented from TeDatabasePortal.

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

Implements TeDatabasePortal.

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

Implements TeDatabasePortal.

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

Implements TeDatabasePortal.

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

Implements TeDatabasePortal.

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

Reimplemented from TeDatabasePortal.

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

Reimplemented from TeDatabasePortal.

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

Reimplemented from TeDatabasePortal.

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

Reimplemented from TeDatabasePortal.

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

Fetchs a particular row.

Implements TeDatabasePortal.

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

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

Implements TeDatabasePortal.

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

Frees the current record set.

Implements TeDatabasePortal.

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

Gets the value of a named BLOB attribute.

Implements TeDatabasePortal.

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

Gets the value of a named attribute as a boolean.

Implements TeDatabasePortal.

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

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

Implements TeDatabasePortal.

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

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

Implements TeDatabasePortal.

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

Gets the value of a named attribute as a literal.

Implements TeDatabasePortal.

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

Gets the value of a named attribute as a date.

Implements TeDatabasePortal.

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

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

Implements TeDatabasePortal.

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

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

Implements TeDatabasePortal.

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

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

Implements TeDatabasePortal.

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

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

Reimplemented from TeDatabasePortal.

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

Gets the value of a named attribute as a double.

Reimplemented from TeDatabasePortal.

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

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

Reimplemented from TeDatabasePortal.

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

Gets the value of a named attribute as an integer.

Reimplemented from TeDatabasePortal.

TeLinearRing TeMySQLPortal::getLinearRing | ( | int & | ni | ) | `[protected]`

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

Implements TeDatabasePortal.

int TeMySQLPortal::insertId | ( |  | ) |

bool TeMySQLPortal::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.

st_mysql_res* TeMySQLPortal::result | ( |  | ) | `[inline]`

bool TeMySQLPortal::setData | ( | int | ,
|  | string |
| ) |  | `[inline]`

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/MySQL/TeMySQL.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/MySQL/TeMySQL.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines