![]() |
TerraLib 4.1
|
A class that implements a concept of record set to a ORACLE DBMS. More...
#include <TeOCIOracle.h>
Public Member Functions | |
| TeOCIOraclePortal (TeOCIOracle *pDatabase) | |
| Constructor. | |
| virtual | ~TeOCIOraclePortal () |
| Destructor. | |
| TeOCICursor * | getCursor () |
| Returns a pointer to the record set. | |
| bool | moveFirst () |
| Moves to the first row in the record set. | |
| bool | moveNext () |
| Moves to the next row in the record set. | |
| bool | query (const string &q, TeCursorLocation l=TeSERVERSIDE, TeCursorType t=TeUNIDIRECTIONAL, TeCursorEditType e=TeREADONLY, TeCursorDataType dt=TeTEXTCURSOR) |
| Executes a SQL statement that return rows or records (SELECT ...) | |
| bool | fetchRow () |
| Fetchs to next row. | |
| bool | fetchRow (int i) |
| Fetchs to i-th row. | |
| void | freeResult () |
| Clear all memory located by the record set. | |
| bool | getRasterBlock (unsigned long &size, unsigned char *) |
| Gets a raster geometry block. | |
Methods that get values from record set | |
| 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 | getBlob (const string &s, unsigned char *&data, long &size) |
| Gets the value of a named BLOB attribute. | |
| 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. | |
Methods that return a geometry from the record set current row and fetch to next row | |
| virtual bool | fetchGeometry (TePolygon &poly) |
| virtual bool | fetchGeometry (TeLine2D &line) |
| virtual bool | fetchGeometry (TePoint &p) |
| virtual bool | fetchGeometry (TeNode &n) |
| virtual bool | fetchGeometry (TePolygon &poly, const unsigned int &initIndex) |
| virtual bool | fetchGeometry (TeLine2D &line, const unsigned int &initIndex) |
| virtual bool | fetchGeometry (TePoint &p, const unsigned int &initIndex) |
| virtual bool | fetchGeometry (TeNode &n, const unsigned int &initIndex) |
Protected Member Functions | |
| bool | isConnected () |
| Verify if there is a connection associated to this cursor. | |
| bool | isEOF () |
| Verify if the current row is the last of the record set. | |
| bool | getLinearRing (TeLine2D &line) |
| Gets a linear ring from blob type. | |
| bool | getLinearRing (TeLine2D &line, const unsigned int &i) |
| Gets a linear ring that begins in the i-th portal position from blob type. | |
Protected Attributes | |
| TeOCICursor * | cursor_ |
| pointer to a record set | |
| long | curRow_ |
| current row index in the record set | |
A class that implements a concept of record set to a ORACLE DBMS.
This class is part of the driver of interface between TerraLib and ORACLE DBMS. It was developed using OCI (Oracle Call Interface) library. The class TeOCIOraclePortal implements the abstract interface defined by the class TeDatabasePortal.
| TeOCIOraclePortal::TeOCIOraclePortal | ( | TeOCIOracle * | pDatabase | ) |
Constructor.
| TeOCIOraclePortal::~TeOCIOraclePortal | ( | ) | [virtual] |
Destructor.
| bool TeOCIOraclePortal::fetchGeometry | ( | TePolygon & | poly | ) | [virtual] |
Implements TeDatabasePortal.
Reimplemented in TeOracleSpatialPortal.
| bool TeOCIOraclePortal::fetchGeometry | ( | TeNode & | n, |
| const unsigned int & | initIndex | ||
| ) | [virtual] |
Reimplemented from TeDatabasePortal.
Reimplemented in TeOracleSpatialPortal.
| bool TeOCIOraclePortal::fetchGeometry | ( | TeLine2D & | line | ) | [virtual] |
Implements TeDatabasePortal.
Reimplemented in TeOracleSpatialPortal.
| bool TeOCIOraclePortal::fetchGeometry | ( | TePoint & | p, |
| const unsigned int & | initIndex | ||
| ) | [virtual] |
Reimplemented from TeDatabasePortal.
Reimplemented in TeOracleSpatialPortal.
| bool TeOCIOraclePortal::fetchGeometry | ( | TePoint & | p | ) | [virtual] |
Implements TeDatabasePortal.
Reimplemented in TeOracleSpatialPortal.
| bool TeOCIOraclePortal::fetchGeometry | ( | TeNode & | n | ) | [virtual] |
Implements TeDatabasePortal.
Reimplemented in TeOracleSpatialPortal.
| bool TeOCIOraclePortal::fetchGeometry | ( | TePolygon & | poly, |
| const unsigned int & | initIndex | ||
| ) | [virtual] |
Reimplemented from TeDatabasePortal.
Reimplemented in TeOracleSpatialPortal.
| bool TeOCIOraclePortal::fetchGeometry | ( | TeLine2D & | line, |
| const unsigned int & | initIndex | ||
| ) | [virtual] |
Reimplemented from TeDatabasePortal.
Reimplemented in TeOracleSpatialPortal.
| bool TeOCIOraclePortal::fetchRow | ( | int | i | ) | [virtual] |
Fetchs to i-th row.
Implements TeDatabasePortal.
| bool TeOCIOraclePortal::fetchRow | ( | ) | [virtual] |
Fetchs to next row.
Implements TeDatabasePortal.
| void TeOCIOraclePortal::freeResult | ( | void | ) | [virtual] |
Clear all memory located by the record set.
Implements TeDatabasePortal.
| bool TeOCIOraclePortal::getBlob | ( | const string & | s, |
| unsigned char *& | data, | ||
| long & | size | ||
| ) | [virtual] |
Gets the value of a named BLOB attribute.
Implements TeDatabasePortal.
| bool TeOCIOraclePortal::getBool | ( | const string & | s | ) | [virtual] |
Gets the value of a named attribute as a boolean.
Implements TeDatabasePortal.
| bool TeOCIOraclePortal::getBool | ( | int | i | ) | [virtual] |
Gets the value of the i-th attribute as a boolean.
Implements TeDatabasePortal.
| TeOCICursor* TeOCIOraclePortal::getCursor | ( | ) | [inline] |
Returns a pointer to the record set.
| char * TeOCIOraclePortal::getData | ( | const string & | s | ) | [virtual] |
Gets the value of a named attribute as a literal.
Implements TeDatabasePortal.
| char * TeOCIOraclePortal::getData | ( | int | i | ) | [virtual] |
Gets the value of the i-th attribute as a literal.
Implements TeDatabasePortal.
| TeTime TeOCIOraclePortal::getDate | ( | int | i | ) | [virtual] |
Gets the value of the i-th attribute as a date.
Implements TeDatabasePortal.
Gets the value of a named attribute as a date.
Implements TeDatabasePortal.
| string TeOCIOraclePortal::getDateAsString | ( | int | i | ) | [virtual] |
Gets the of a date/time attribute as a string formatted as accepted in further SQL statements.
Implements TeDatabasePortal.
Gets the of a date/time attribute as a string formatted as accepted in further SQL statements.
Implements TeDatabasePortal.
| double TeOCIOraclePortal::getDouble | ( | int | i | ) | [virtual] |
Gets the value of the i-th attribute as a double.
Reimplemented from TeDatabasePortal.
| double TeOCIOraclePortal::getDouble | ( | const string & | s | ) | [virtual] |
Gets the value of a named attribute as a double.
Reimplemented from TeDatabasePortal.
| int TeOCIOraclePortal::getInt | ( | const string & | s | ) | [virtual] |
Gets the value of a named attribute as an integer.
Reimplemented from TeDatabasePortal.
| int TeOCIOraclePortal::getInt | ( | int | i | ) | [virtual] |
Gets the value of the i-th attribute as an integer.
Reimplemented from TeDatabasePortal.
| bool TeOCIOraclePortal::getLinearRing | ( | TeLine2D & | line, |
| const unsigned int & | i | ||
| ) | [protected] |
Gets a linear ring that begins in the i-th portal position from blob type.
| bool TeOCIOraclePortal::getLinearRing | ( | TeLine2D & | line | ) | [protected] |
Gets a linear ring from blob type.
| bool TeOCIOraclePortal::getRasterBlock | ( | unsigned long & | size, |
| unsigned char * | ptData | ||
| ) | [virtual] |
Gets a raster geometry block.
Implements TeDatabasePortal.
| bool TeOCIOraclePortal::isConnected | ( | ) | [protected] |
Verify if there is a connection associated to this cursor.
| bool TeOCIOraclePortal::isEOF | ( | ) | [protected] |
Verify if the current row is the last of the record set.
| bool TeOCIOraclePortal::moveFirst | ( | ) |
Moves to the first row in the record set.
| bool TeOCIOraclePortal::moveNext | ( | ) |
Moves to the next row in the record set.
| bool TeOCIOraclePortal::query | ( | const string & | q, |
| TeCursorLocation | l = TeSERVERSIDE, |
||
| TeCursorType | t = TeUNIDIRECTIONAL, |
||
| TeCursorEditType | e = TeREADONLY, |
||
| TeCursorDataType | dt = TeTEXTCURSOR |
||
| ) | [virtual] |
Executes a SQL statement that return rows or records (SELECT ...)
Implements TeDatabasePortal.
long TeOCIOraclePortal::curRow_ [protected] |
current row index in the record set
TeOCICursor* TeOCIOraclePortal::cursor_ [protected] |
pointer to a record set