TeDatabase.h File Reference


Detailed Description

Definition in file TeDatabase.h.

#include "TeDefines.h"
#include "TeDataTypes.h"
#include "TeTable.h"
#include "TeGeometry.h"
#include "TeStatistics.h"
#include "TeProject.h"
#include "TeRaster.h"
#include "TeView.h"
#include "TeVisual.h"
#include "TeMetaModelCache.h"
#include "TeSharedPtr.h"
#include "TeDatabaseIndex.h"
#include "TeConnection.h"
#include <set>
#include <string>

Go to the source code of this file.

Data Structures

class  TeDatabase
 An abstract database class. More...
class  TeDatabasePortal
 An abstract access portal to a database. More...

Typedefs

typedef vector
< TeGeometry * > 
TeGeometryVect
 A Vector of pointers to TeGeometry.
typedef vector< stringTeKeys
 A vector of objects identifications (object_id).
typedef map< string,
double > 
TeKeysToDist
 A Map of objects identifications (object_id) to a distance value.
typedef map< string,
TeStatisticsDimensionVect
TeObjectStatistics
 A Map of the objects identifications to a set of statistical values.

Enumerations

enum  TeCursorDataType { TeBINARYCURSOR, TeTEXTCURSOR }
enum  TeCursorEditType { TeREADONLY, TeREADWRITE }
enum  TeCursorLocation { TeCLIENTESIDE, TeSERVERSIDE }
enum  TeCursorType { TeUNIDIRECTIONAL, TeBIDIRECTIONAL, TeRANDOMACCESS }
enum  TeSpatialIndexType { TeRTREE, TeQUADTREE }

Functions

template<typename Iterator>
vector< stringgenerateInClauses (const Iterator &begin, const Iterator &end, TeDatabase *db, bool addPlicae=true)
 Breaks a collection of strings into a series of IN clauses to be used in query expressions.


Typedef Documentation

typedef vector<TeGeometry*> TeGeometryVect

Definition at line 93 of file TeDatabase.h.

typedef vector<string> TeKeys

Definition at line 87 of file TeDatabase.h.

typedef map<string, double> TeKeysToDist

Definition at line 90 of file TeDatabase.h.

typedef map<string, TeStatisticsDimensionVect> TeObjectStatistics

Definition at line 96 of file TeDatabase.h.


Enumeration Type Documentation

enum TeCursorDataType

Type of edition on record set cursor

Enumerator:
TeBINARYCURSOR 
TeTEXTCURSOR 

Definition at line 78 of file TeDatabase.h.

enum TeCursorEditType

Type of edition on record set cursor

Enumerator:
TeREADONLY 
TeREADWRITE 

Definition at line 73 of file TeDatabase.h.

00073 { TeREADONLY, TeREADWRITE };

enum TeCursorLocation

Location of a cursor on record set

Enumerator:
TeCLIENTESIDE 
TeSERVERSIDE 

Definition at line 63 of file TeDatabase.h.

enum TeCursorType

Type of cursor on record set

Enumerator:
TeUNIDIRECTIONAL 
TeBIDIRECTIONAL 
TeRANDOMACCESS 

Definition at line 68 of file TeDatabase.h.

enum TeSpatialIndexType

Type of spatial index

Enumerator:
TeRTREE 
TeQUADTREE 

Definition at line 84 of file TeDatabase.h.

00084 {TeRTREE, TeQUADTREE};


Function Documentation

template<typename Iterator>
vector<string> generateInClauses ( const Iterator &  begin,
const Iterator &  end,
TeDatabase db,
bool  addPlicae = true 
) [inline]

Definition at line 1789 of file TeDatabase.h.

References TeDatabase::escapeSequence().

Referenced by deletePointedObjects(), generateCountLegends(), getItems(), TeTheme::getItemVector(), getObject2ItemsMap(), getObjects(), TeTheme::getObjects(), saveObjectStatus(), TeCopyExternThemeToLayer(), and TePlotSelectedObjects().

01790 {
01791         int i, chunkSize = 200;
01792         string inClause;
01793         vector<string> inClauseVector;
01794 
01795         Iterator temp = begin;
01796         i = 0;
01797         while (temp != end)
01798         {
01799                 if (i%chunkSize == 0)
01800                 {
01801                         if (!inClause.empty())
01802                         {
01803                                 inClause[inClause.size() - 1] = ')';
01804                                 inClauseVector.push_back(inClause);
01805                                 inClause.clear();
01806                         }
01807                         inClause = "(";
01808                 }
01809 
01810                 if (addPlicae)
01811                         inClause += "'" + db->escapeSequence(*temp) + "',";
01812                 else
01813                         inClause += db->escapeSequence(*temp) + ",";
01814                 i++;
01815                 ++temp;
01816         }
01817         if (!inClause.empty())
01818         {
01819                 inClause[inClause.size() - 1] = ')';
01820                 inClauseVector.push_back(inClause);
01821         }
01822         return inClauseVector;
01823 }


Generated on Sun Jul 29 04:03:45 2012 for TerraLib - Development Source by  doxygen 1.5.3