Namespace for the TerraLib ADO driver implementation. More...
Classes | |
class | Connection |
A class that implements a connection to a ADO database. More... | |
class | DataSet |
Implementation of a dataset for the ADO driver. More... | |
class | DataSource |
The ADO driver. More... | |
class | Globals |
An static class with global definitions. More... | |
class | Module |
class | SQLVisitor |
A visitor for building an SQL statement using ADO dialect. More... | |
class | Transactor |
The transactor class for the Microsoft Access driver. More... | |
Functions | |
void | Blob2Variant (const char *blob, int size, _variant_t &var) |
Convert a blob to a variant. More... | |
te::da::DataSource * | Build () |
ADOX::DataTypeEnum | Convert2Ado (int terralib) |
Bind TerraLib Type to ADO Type. More... | |
void | Convert2Ado (const te::gm::Geometry *geo, _variant_t &var) |
Bind TerraLib geometry to ADO variant. More... | |
int | Convert2Terralib (ADOX::DataTypeEnum adoType) |
Bind ADOX Type to TerraLib Type. More... | |
int | Convert2Terralib (::DataTypeEnum adoType) |
Bind ADO Type to TerraLib Type. More... | |
te::dt::Property * | Convert2Terralib (ADOX::_ColumnPtr column) |
Bind ADO column to Terralib property. More... | |
te::da::Constraint * | Convert2Terralib (ADOX::_KeyPtr key) |
Bind ADO key to Terralib constraint. More... | |
std::vector< te::dt::Property * > | Convert2Terralib (ADOX::ColumnsPtr columns) |
Bind ADO columns to vector of Terralib properties. More... | |
std::string | GetAdoStringType (const int &terralib) |
Bind TerraLib type to an ADO valid fiel type name. More... | |
std::auto_ptr< te::dt::DateTime > | GetDateTime (std::string &value, std::string &mask, std::string &sepD, std::string &sepT) |
It gets the DateTime TerraLib 5 from string. More... | |
std::string | GetFormattedDateTime (te::dt::DateTime *dateTime) |
It gets a formatted DateTime string for ADO. More... | |
const std::string & | GetGeometryName (te::gm::GeomType t) |
It returns the geometry OGC names. More... | |
const te::gm::GeomType | GetGeometryType (std::string t) |
It returns the geometry type concerning the OGC name. More... | |
int | GetMonth (const std::string &month) |
It gets the index of a month. More... | |
int | GetSRID (_ConnectionPtr adoConn, std::string tableName, std::string geomPropName) |
Read the geometry_columns table end return a SRID. More... | |
std::string | GetSystemDateTimeFormat (std::string &indAM, std::string &indPM, std::string &sepD, std::string &sepT) |
It gets the system Date and Time format. More... | |
te::gm::GeomType | GetType (_ConnectionPtr adoConn, std::string tableName, std::string geomPropName) |
Read the geometry_columns table end return a geometry type. More... | |
bool | IsGeomProperty (_ConnectionPtr adoConn, std::string tableName, std::string columnName) |
Verifies whether is in the geometry_columns table. More... | |
bool | IsZProperty (te::gm::GeomType type) |
Verifies whether Z property. More... | |
std::string | MakeConnectionStr (const std::map< std::string, std::string > &dsInfo) |
Create a connection string based on a map. More... | |
void | Variant2Blob (const _variant_t var, int size, char *&blob) |
Convert a variant to a blob. More... | |
Namespace for the TerraLib ADO driver implementation.
void te::ado::Blob2Variant | ( | const char * | blob, |
int | size, | ||
_variant_t & | var | ||
) |
Convert a blob to a variant.
blob | Blob |
size | Blob size |
var | Result variant |
Definition at line 56 of file Utils.cpp.
Referenced by Convert2Ado().
|
inline |
Definition at line 36 of file DataSourceFactory.h.
Referenced by te::ado::Module::startup().
ADOX::DataTypeEnum te::ado::Convert2Ado | ( | int | terralib | ) |
Bind TerraLib Type to ADO Type.
terralib | TerraLib Type. |
Definition at line 121 of file Utils.cpp.
References te::dt::ARRAY_TYPE, te::dt::BOOLEAN_TYPE, te::dt::BYTE_ARRAY_TYPE, te::dt::CHAR_TYPE, te::dt::DATETIME_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::GEOMETRY_TYPE, te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::dt::NUMERIC_TYPE, te::dt::STRING_TYPE, TE_TR, and te::dt::UCHAR_TYPE.
Referenced by te::ado::Transactor::add(), te::ado::Transactor::addForeignKey(), te::ado::Transactor::addIndex(), te::ado::Transactor::addPrimaryKey(), te::ado::Transactor::addProperty(), te::ado::Transactor::addUniqueKey(), and GetAdoStringType().
void te::ado::Convert2Ado | ( | const te::gm::Geometry * | geo, |
_variant_t & | var | ||
) |
Bind TerraLib geometry to ADO variant.
geo | TerraLib Geometry. |
var | Ado variant |
Definition at line 208 of file Utils.cpp.
References Blob2Variant(), te::gm::Geometry::getSRID(), te::gm::Geometry::getWkb(), te::gm::Geometry::getWkbSize(), and te::common::NDR.
int te::ado::Convert2Terralib | ( | ADOX::DataTypeEnum | adoType | ) |
Bind ADOX Type to TerraLib Type.
adoType | ADOX Type. |
Definition at line 229 of file Utils.cpp.
References te::dt::BOOLEAN_TYPE, te::dt::BYTE_ARRAY_TYPE, te::dt::DATETIME_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::STRING_TYPE, te::dt::UINT16_TYPE, te::dt::UINT32_TYPE, te::dt::UINT64_TYPE, te::dt::UNKNOWN_TYPE, and te::dt::VOID_TYPE.
Referenced by te::ado::DataSet::DataSet(), and te::ado::Transactor::getProperties().
int te::ado::Convert2Terralib | ( | ::DataTypeEnum | adoType | ) |
Bind ADO Type to TerraLib Type.
adoType | Ado Type. |
Definition at line 317 of file Utils.cpp.
References te::dt::BOOLEAN_TYPE, te::dt::BYTE_ARRAY_TYPE, te::dt::DATETIME_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::STRING_TYPE, te::dt::UINT16_TYPE, te::dt::UINT32_TYPE, te::dt::UINT64_TYPE, te::dt::UNKNOWN_TYPE, and te::dt::VOID_TYPE.
te::dt::Property * te::ado::Convert2Terralib | ( | ADOX::_ColumnPtr | column | ) |
Bind ADO column to Terralib property.
column | Ado Column. |
Definition at line 405 of file Utils.cpp.
References Convert2Terralib(), te::dt::DATE, TE_TR, te::dt::TIME_DURATION, and te::dt::TIME_INSTANT.
te::da::Constraint * te::ado::Convert2Terralib | ( | ADOX::_KeyPtr | key | ) |
Bind ADO key to Terralib constraint.
key | Ado key. |
Definition at line 496 of file Utils.cpp.
References Convert2Terralib(), te::da::PrimaryKey::setProperties(), te::da::UniqueKey::setProperties(), te::da::ForeignKey::setProperties(), and TE_TR.
std::vector< te::dt::Property * > te::ado::Convert2Terralib | ( | ADOX::ColumnsPtr | columns | ) |
Bind ADO columns to vector of Terralib properties.
columns | Ado columns. |
Definition at line 486 of file Utils.cpp.
References Convert2Terralib().
std::string te::ado::GetAdoStringType | ( | const int & | terralib | ) |
Bind TerraLib type to an ADO valid fiel type name.
TerraLib data type.
Definition at line 174 of file Utils.cpp.
References Convert2Ado().
Referenced by te::ado::Transactor::changePropertyDefinition().
std::auto_ptr< te::dt::DateTime > te::ado::GetDateTime | ( | std::string & | value, |
std::string & | mask, | ||
std::string & | sepD, | ||
std::string & | sepT | ||
) |
It gets the DateTime TerraLib 5 from string.
value | String value to be read. |
mask | System DateTime mask; |
sepD | Date separator. |
sepT | Time separator. |
Definition at line 1093 of file Utils.cpp.
References TE_TR, and te::common::Tokenize().
Referenced by te::ado::DataSet::getDateTime().
std::string te::ado::GetFormattedDateTime | ( | te::dt::DateTime * | dateTime | ) |
It gets a formatted DateTime string for ADO.
dateTime | TerraLib 5 DateTime. |
Definition at line 1255 of file Utils.cpp.
References te::dt::TimeInstant::getDate(), te::dt::Date::getDay(), te::dt::TimeDuration::getHours(), te::dt::TimeDuration::getMinutes(), te::dt::Date::getMonth(), GetMonth(), te::dt::TimeDuration::getSeconds(), GetSystemDateTimeFormat(), te::dt::TimeInstant::getTime(), te::dt::TimeInstantTZ::getTimeInstantTZ(), and te::dt::Date::getYear().
Referenced by te::ado::Transactor::add().
const std::string & te::ado::GetGeometryName | ( | te::gm::GeomType | t | ) |
It returns the geometry OGC names.
t | The TerraLib geometry type. |
Definition at line 525 of file Utils.cpp.
References te::gm::CurvePolygonMType, te::gm::CurvePolygonType, te::gm::CurvePolygonZMType, te::gm::CurvePolygonZType, te::gm::GeometryMType, te::gm::GeometryType, te::gm::GeometryZMType, te::gm::GeometryZType, te::gm::LineStringMType, te::gm::LineStringType, te::gm::LineStringZMType, te::gm::LineStringZType, te::gm::MultiLineStringMType, te::gm::MultiLineStringType, te::gm::MultiLineStringZMType, te::gm::MultiLineStringZType, te::gm::MultiPointMType, te::gm::MultiPointType, te::gm::MultiPointZMType, te::gm::MultiPointZType, te::gm::MultiPolygonMType, te::gm::MultiPolygonType, te::gm::MultiPolygonZMType, te::gm::MultiPolygonZType, te::gm::PointMType, te::gm::PointType, te::gm::PointZMType, te::gm::PointZType, te::gm::PolygonMType, te::gm::PolygonType, te::gm::PolygonZMType, te::gm::PolygonZType, te::gm::PolyhedralSurfaceMType, te::gm::PolyhedralSurfaceType, te::gm::PolyhedralSurfaceZMType, and te::gm::PolyhedralSurfaceZType.
Referenced by te::ado::Transactor::insertIntoGeometryColumns().
const te::gm::GeomType te::ado::GetGeometryType | ( | std::string | t | ) |
It returns the geometry type concerning the OGC name.
t | The OGC type name |
Definition at line 678 of file Utils.cpp.
References te::gm::CurvePolygonMType, te::gm::CurvePolygonType, te::gm::CurvePolygonZMType, te::gm::CurvePolygonZType, te::gm::GeometryMType, te::gm::GeometryType, te::gm::GeometryZMType, te::gm::GeometryZType, te::gm::LineStringMType, te::gm::LineStringType, te::gm::LineStringZMType, te::gm::LineStringZType, te::gm::MultiLineStringMType, te::gm::MultiLineStringType, te::gm::MultiLineStringZMType, te::gm::MultiLineStringZType, te::gm::MultiPointMType, te::gm::MultiPointType, te::gm::MultiPointZMType, te::gm::MultiPointZType, te::gm::MultiPolygonMType, te::gm::MultiPolygonType, te::gm::MultiPolygonZMType, te::gm::MultiPolygonZType, te::gm::PointMType, te::gm::PointType, te::gm::PointZMType, te::gm::PointZType, te::gm::PolygonMType, te::gm::PolygonType, te::gm::PolygonZMType, te::gm::PolygonZType, te::gm::PolyhedralSurfaceMType, te::gm::PolyhedralSurfaceType, te::gm::PolyhedralSurfaceZMType, te::gm::PolyhedralSurfaceZType, and te::gm::UnknownGeometryType.
Referenced by GetType().
int te::ado::GetMonth | ( | const std::string & | month | ) |
It gets the index of a month.
month | Month name. |
Definition at line 1062 of file Utils.cpp.
References te::common::Convert2UCase().
Referenced by GetFormattedDateTime().
int te::ado::GetSRID | ( | _ConnectionPtr | adoConn, |
std::string | tableName, | ||
std::string | geomPropName | ||
) |
Read the geometry_columns table end return a SRID.
adoConn | Ado connection. |
tableName | The table name. |
geomPropName | The geometry property name. |
Definition at line 828 of file Utils.cpp.
References TESTHR().
Referenced by te::ado::Transactor::getProperties().
std::string te::ado::GetSystemDateTimeFormat | ( | std::string & | indAM, |
std::string & | indPM, | ||
std::string & | sepD, | ||
std::string & | sepT | ||
) |
It gets the system Date and Time format.
indAM | AM indicator string. |
indPM | PM indicator string. |
sepD | Date separator. |
sepT | Time separator. |
Definition at line 924 of file Utils.cpp.
References te::common::Convert2UCase().
Referenced by te::ado::DataSet::getDateTime(), and GetFormattedDateTime().
te::gm::GeomType te::ado::GetType | ( | _ConnectionPtr | adoConn, |
std::string | tableName, | ||
std::string | geomPropName | ||
) |
Read the geometry_columns table end return a geometry type.
adoConn | Ado connection. |
tableName | The table name. |
geomPropName | The geometry property name. |
Definition at line 852 of file Utils.cpp.
References GetGeometryType(), and TESTHR().
Referenced by te::ado::Transactor::getProperties().
bool te::ado::IsGeomProperty | ( | _ConnectionPtr | adoConn, |
std::string | tableName, | ||
std::string | columnName | ||
) |
bool te::ado::IsZProperty | ( | te::gm::GeomType | type | ) |
Verifies whether Z property.
type | geometry type |
Definition at line 917 of file Utils.cpp.
Referenced by te::ado::Transactor::insertIntoGeometryColumns().
std::string te::ado::MakeConnectionStr | ( | const std::map< std::string, std::string > & | dsInfo | ) |
Create a connection string based on a map.
dsInfo | Information Map. |
Definition at line 75 of file Utils.cpp.
Referenced by te::ado::DataSource::create(), te::ado::DataSource::open(), and te::ado::Transactor::Transactor().