Namespace for the TerraLib PostGIS driver implementation. More...
Classes | |
struct | Array |
Auxiliary structure used to decode Array data types. More... | |
class | Connection |
A class that implements a connection to a PostgreSQL database. More... | |
class | ConnectionPool |
This class implements a connection pool for the PostGIS driver. More... | |
class | DataSet |
Implementation of a dataset for the PostGIS driver. More... | |
class | DataSource |
The PostGIS driver. More... | |
class | EWKBReader |
An utility class for reading a PostGIS EWKB. More... | |
class | EWKBWriter |
An utility class for writing a PostGIS EWKB. More... | |
class | Globals |
An static class with global definitions. More... | |
class | Module |
The TerraLib PostGIS driver is a plugin. More... | |
struct | Numeric |
Auxiliary structure used to decode Numeric data types. More... | |
class | PreparedQuery |
A class that implements a prepared query for PostgreSQL data access driver. More... | |
class | SQLVisitor |
A visitor for building an SQL statement using PostGIS dialect. More... | |
class | Transactor |
The transactor class for the PostGIS driver. More... | |
struct | VersionInfo |
A data structure for holding version information. More... | |
Typedefs | |
typedef boost::shared_ptr< Transactor > | TransactorPtr |
Functions | |
void | BindValue (te::pgis::PreparedQuery *pq, te::da::DataSet *d, std::size_t i, std::size_t propertyPos) |
te::da::DataSource * | Build () |
void | Convert2OGCWKBType (unsigned int &gType) |
It converts the PostGIS geometry type to a pure OGC WKB code. More... | |
void | Convert2PostGIS (const te::gm::Envelope *e, int srid, std::string &output) |
It converts the envelope into a PostGIS BOX3D. More... | |
void | Convert2PostGIS (PGconn *conn, const te::gm::Geometry *g, std::string &output) |
It converts the geometry into a PostGIS geometry. More... | |
void | Convert2PostGISWKBType (unsigned int &gType) |
te::dt::Property * | Convert2TerraLib (unsigned int attNum, const char *attName, unsigned int attType, bool attNotNull, const char *fmt, bool attHasDefault, const char *attDefValue, unsigned int pgisGeomTypeOid, unsigned int pgisRasterTypeOid) |
It creates a PropertyType from a PostgreSQL attribute description. More... | |
te::dt::Property * | Convert2TerraLib (unsigned int attNum, const char *attName, unsigned int attType, bool attNotNull, const char *fmt, bool attHasDefault, const char *attDefValue, int ndims, unsigned int pgisGeomTypeOid, unsigned int pgisRasterTypeOid) |
It creates a PropertyType from a PostgreSQL attribute description. More... | |
void | Convert2TerraLib (PGresult *result, unsigned int pgisGeomTypeOid, unsigned int pgisRasterTypeOid, std::vector< int > &teTypes) |
It creates a data set type from a PostGIS internal result. More... | |
int | Date2Julian (int y, int m, const int d) |
It returns a julian date (in seconds) from a gregorian date. More... | |
te::da::FKActionType | GetAction (char a) |
It converts the PostgreSQL foreign key modifier to a TerraLib data type. More... | |
template<class T , class ALIGN > | |
void | GetArray (int i, int j, PGresult *result, std::vector< T > &a) |
It retrieves information from an unidimensional array. More... | |
std::string | GetBindableUpdateSQL (const std::vector< te::dt::Property * > &properties) |
Given a list of properties it constructs a string with bindable parameters that can be used inside an update query. More... | |
std::string | GetBindableWhereSQL (const std::vector< te::dt::Property * > &properties, const std::size_t offset=0) |
Given a list of properties it creates an AND connected expression with bindable parameters ($n). More... | |
std::string | GetBoxSpatialRelation (te::gm::SpatialRelation rel) |
It converts the spatial relationship to PostGIS dialect. More... | |
template<class T > | |
T * | GetCoordSequence (const char *ewkb, const char **endptr, unsigned int gType, char byteOrder) |
te::gm::Envelope * | GetEnvelope (const char *str) |
It converts the pgType to a valid TerraLib data type. More... | |
const std::string & | GetGeometryName (te::gm::GeomType t) |
It returns the geometry names as usual for PostGIS. More... | |
te::da::IndexType | GetIndexType (const char *t) |
It converts the PostgreSQL index string to a TerraLib index type. More... | |
std::string | GetLoadDataRow (const te::da::DataSetType *dt, te::da::DataSet *d, PGconn *conn) |
const char * | GetPGEncoding (te::common::CharEncoding encoding) |
std::string | GetSpatialRelation (te::gm::SpatialRelation rel) |
It converts the spatial relationship to PostGIS dialect. More... | |
std::string | GetSQLBindValues (std::size_t nproperties) |
std::string | GetSQLValue (const te::dt::Property *p, std::size_t propertyPos, te::da::DataSet *d, PGconn *conn) |
std::string | GetSQLValues (const te::da::DataSetType *dt, te::da::DataSet *d, PGconn *conn) |
te::common::CharEncoding | GetTeEncoding (const char *const encoding) |
te::dt::DateTime * | Internal2Date (const long dDate) |
It returns a DateTime type from a date loaded by PostgreSQL. More... | |
te::dt::DateTime * | Internal2Time (boost::int64_t tval) |
It returns a DateTime type from a time loaded by PostgreSQL. More... | |
te::dt::DateTime * | Internal2TimeStamp (boost::int64_t ival) |
It returns a DateTime type from a timestamp loaded by PostgreSQL. More... | |
te::dt::DateTime * | Internal2TimeTZ (boost::int64_t tval, int z) |
void | Julian2Date (const int jd, int *year, int *month, int *day) |
It returns a gregorian date from a julian date (in seconds). More... | |
std::string | MakeConnectionStr (const std::map< std::string, std::string > &dsInfo) |
void | ScapeString (PGconn *conn, const std::string &s, std::string &output) |
It escapes a string for use within an SQL command. More... | |
bool | SetColumnDef (std::string &s, const std::string &tname, const te::dt::SimpleProperty *p, bool justDataType=false) |
void | SetColumnDef (std::string &s, const te::dt::NumericProperty *p, bool justDataType=false) |
bool | SetColumnDef (std::string &s, const te::dt::Property *p, bool justDataType=false) |
It writes the PostgreSQL column definition to the output string. More... | |
void | SetColumnDef (std::string &s, const std::string &tname, const te::dt::StringProperty *p, bool justDataType=false) |
void | SetColumnDef (std::string &s, const te::dt::ArrayProperty *p, bool justDataType=false) |
void | SplitTableName (const std::string &fullName, const std::string *defaultSchema, std::string &schemaName, std::string &tableName) |
Namespace for the TerraLib PostGIS driver implementation.
typedef boost::shared_ptr<Transactor> te::pgis::TransactorPtr |
Definition at line 475 of file Transactor.h.
|
inline |
Definition at line 61 of file PreparedQuery.cpp.
References te::pgis::PreparedQuery::bind(), te::pgis::PreparedQuery::bindNumeric(), 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::da::DataSet::getBool(), te::da::DataSet::getByteArray(), te::da::DataSet::getChar(), te::da::DataSet::getDateTime(), te::da::DataSet::getDouble(), te::da::DataSet::getFloat(), te::da::DataSet::getGeometry(), te::da::DataSet::getInt16(), te::da::DataSet::getInt32(), te::da::DataSet::getInt64(), te::da::DataSet::getNumeric(), te::da::DataSet::getPropertyDataType(), te::da::DataSet::getString(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::da::DataSet::isNull(), te::dt::NUMERIC_TYPE, te::dt::STRING_TYPE, and TE_TR.
Referenced by te::pgis::PreparedQuery::bind().
|
inline |
Definition at line 36 of file DataSourceFactory.h.
Referenced by te::pgis::Module::startup().
|
inline |
It converts the PostGIS geometry type to a pure OGC WKB code.
This function will turn off the PostGIS flags and will turn on the right bits for OGC WKB type.
gType | A value that can have some flags set by PostGIS. |
Definition at line 900 of file Utils.h.
References TE_EWKB_M_OFFSET, TE_EWKB_Z_OFFSET, and TE_EWKB_ZM_OFFSET.
Referenced by te::ag::Canvas::drawGeometry(), GetCoordSequence(), te::pgis::EWKBReader::getGeometry(), te::pgis::EWKBReader::getGeometryCollection(), te::pgis::EWKBReader::getPoint(), and te::pgis::EWKBReader::getPolygon().
|
inline |
It converts the envelope into a PostGIS BOX3D.
e | The envelope to be converted. |
srid | The envelope coordinates SRS. |
output | The string to output the result. |
Definition at line 225 of file Utils.h.
References te::common::Convert2String(), te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, and te::gm::Envelope::m_ury.
Referenced by te::pgis::Transactor::getDataSet(), and te::pgis::SQLVisitor::visit().
void te::pgis::Convert2PostGIS | ( | PGconn * | conn, |
const te::gm::Geometry * | g, | ||
std::string & | output | ||
) |
It converts the geometry into a PostGIS geometry.
conn | The connection to be used with bytearray. |
g | The geometry to be converted. |
output | The string to output the result. |
Definition at line 312 of file Utils.cpp.
References te::gm::Geometry::getWkbSize().
|
inline |
Definition at line 930 of file Utils.h.
References TE_EWKB_M_OFFSET, TE_EWKB_Z_OFFSET, and TE_EWKB_ZM_OFFSET.
Referenced by te::pgis::EWKBWriter::visit().
|
inline |
It creates a PropertyType from a PostgreSQL attribute description.
attNum | The column number (a number in the range [1, num-columns]). |
attName | The column name. |
attType | The column type |
attLen | The column size (depends on column type). |
attNotNull | If the column is not null. |
fmt | Column formats: Numeric(20, 30), VARCHAR(30), CHAR(10). |
attHasDefault | True if the column has a default value. |
attDefValue | The default value expression if attHasDefValue is true otherwise this has no meaning. |
pgisGeomTypeOid | The oid of PostGIS geometry type. |
Definition at line 456 of file Utils.h.
References te::dt::BOOLEAN_TYPE, te::dt::BYTE_ARRAY_TYPE, te::dt::CHAR_TYPE, te::dt::DATE, te::dt::DOUBLE_TYPE, te::dt::FIXED_STRING, te::dt::FLOAT_TYPE, te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, PG_BOOL_TYPE, PG_BYTEA_TYPE, PG_CHAR_TYPE, PG_CHARACTER_TYPE, PG_DATE_TYPE, PG_FLOAT4_TYPE, PG_FLOAT8_TYPE, PG_INT2_TYPE, PG_INT4_TYPE, PG_INT8_TYPE, PG_NAME_TYPE, PG_NUMERIC_TYPE, PG_OID_TYPE, PG_TEXT_TYPE, PG_TIME_TYPE, PG_TIMESTAMP_TYPE, PG_TIMESTAMPTZ_TYPE, PG_TIMETZ_TYPE, PG_VARCHAR_TYPE, te::dt::SimpleProperty::setAutoNumber(), te::dt::STRING, te::dt::TIME_DURATION, te::dt::TIME_INSTANT, te::dt::UNKNOWN_TYPE, and te::dt::VAR_STRING.
Referenced by Convert2TerraLib(), te::pgis::Transactor::getDataSet(), te::pgis::Transactor::getProperties(), te::pgis::Transactor::getProperty(), te::pgis::PreparedQuery::query(), and te::pgis::Transactor::query().
|
inline |
It creates a PropertyType from a PostgreSQL attribute description.
attNum | The column number. |
attName | The column name. |
attType | The column type. |
attNotNull | If the column is not null. |
fmt | Column formats: Numeric(20, 30), VARCHAR(30), CHAR(10). |
attHasDefault | True, if the column has a default value. |
attDefValue | The default value expression, if attHasDefValue is true; otherwise, it has no meaning. |
ndims | If different of 0, it indicates an array type. |
pgisGeomTypeOid | The oid of the PostGIS geometry type. |
Definition at line 591 of file Utils.h.
References Convert2TerraLib(), PG__INT2_VECTOR_TYPE, PG_BOOL_ARRAY_TYPE, PG_BOOL_TYPE, PG_BYTEA_ARRAY_TYPE, PG_BYTEA_TYPE, PG_CHAR_ARRAY_TYPE, PG_CHAR_TYPE, PG_CHARACTER_ARRAY_TYPE, PG_CHARACTER_TYPE, PG_DATE_ARRAY_TYPE, PG_DATE_TYPE, PG_FLOAT4_ARRAY_TYPE, PG_FLOAT4_TYPE, PG_FLOAT8_ARRAY_TYPE, PG_FLOAT8_TYPE, PG_INT2_ARRAY_TYPE, PG_INT2_TYPE, PG_INT2_VECTOR_TYPE, PG_INT4_ARRAY_TYPE, PG_INT4_TYPE, PG_INT8_ARRAY_TYPE, PG_INT8_TYPE, PG_NAME_ARRAY_TYPE, PG_NUMERIC_ARRAY_TYPE, PG_NUMERIC_TYPE, PG_OID_ARRAY_TYPE, PG_OID_VECTOR_TYPE, PG_TEXT_ARRAY_TYPE, PG_TEXT_TYPE, PG_TIME_ARRAY_TYPE, PG_TIME_TYPE, PG_TIMESTAMP_ARRAY_TYPE, PG_TIMESTAMP_TYPE, PG_TIMESTAMPTZ_ARRAY_TYPE, PG_TIMESTAMPTZ_TYPE, PG_TIMETZ_ARRAY_TYPE, PG_TIMETZ_TYPE, PG_VARCHAR_ARRAY_TYPE, PG_VARCHAR_TYPE, and te::dt::ArrayProperty::setElementType().
void te::pgis::Convert2TerraLib | ( | PGresult * | result, |
unsigned int | pgisGeomTypeOid, | ||
unsigned int | pgisRasterTypeOid, | ||
std::vector< int > & | teTypes | ||
) |
It creates a data set type from a PostGIS internal result.
result | A PostGIS internal result. |
pgisGeomTypeOid | The oid of PostGIS geometry type. |
Definition at line 339 of file Utils.cpp.
References te::ogr::Convert2TerraLib().
|
inline |
It returns a julian date (in seconds) from a gregorian date.
It returns a julian date (in seconds) from a gregorian date. Internally, postgresql stores julian dates.
y | A year of a gregorian date. |
m | A month of a gregorian date. |
d | A day of a gregorian date. |
|
inline |
It converts the PostgreSQL foreign key modifier to a TerraLib data type.
a | PostgreSQL foreign key modifier type. |
The equivalent TerraLib foreign key modifier type.
Definition at line 113 of file Utils.h.
References te::da::CASCADE, te::da::NO_ACTION, te::da::RESTRICT, te::da::SET_DEFAULT, and te::da::SET_NULL.
Referenced by te::pgis::Transactor::getConstraints(), and te::pgis::Transactor::getForeignKey().
|
inline |
It retrieves information from an unidimensional array.
Requirements on types:
i | The row. |
j | The column. |
result | The result to extract the array. |
a | The output vector. |
Definition at line 77 of file DataSet.cpp.
References te::common::Globals::sm_machineByteOrder, and te::common::SwapBytes().
std::string te::pgis::GetBindableUpdateSQL | ( | const std::vector< te::dt::Property * > & | properties | ) |
Given a list of properties it constructs a string with bindable parameters that can be used inside an update query.
properties | A vector with property names that will be used to create the expression. |
std::string te::pgis::GetBindableWhereSQL | ( | const std::vector< te::dt::Property * > & | properties, |
const std::size_t | offset = 0 |
||
) |
Given a list of properties it creates an AND connected expression with bindable parameters ($n).
itBegin | The start property. |
itEnd | The mark of end of properties. |
|
inline |
It converts the spatial relationship to PostGIS dialect.
rel | The spatial relationship. |
Definition at line 849 of file Utils.h.
References te::gm::CONTAINS, te::gm::COVEREDBY, te::gm::COVERS, te::gm::EQUALS, te::gm::INTERSECTS, te::gm::OVERLAPS, and te::gm::WITHIN.
Referenced by te::pgis::Transactor::getDataSet().
|
inline |
Definition at line 44 of file EWKBReader.cpp.
References Convert2OGCWKBType(), te::gm::LineStringMType, te::gm::LineStringType, te::gm::LineStringZMType, te::gm::LineStringZType, te::common::Globals::sm_machineByteOrder, te::common::SwapBytes(), and TE_EWKB_SRID_FLAG.
|
inline |
It converts the pgType to a valid TerraLib data type.
cols | An array with column numbers. |
dt | The DataSetType to look for the property. |
Definition at line 169 of file Utils.h.
References te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, and te::gm::Envelope::m_ury.
Referenced by te::pgis::Transactor::getExtent().
const std::string & te::pgis::GetGeometryName | ( | te::gm::GeomType | t | ) |
It returns the geometry names as usual for PostGIS.
t | The TerraLib geometry type. |
Definition at line 149 of file Utils.cpp.
References te::gm::GeometryCollectionMType, te::gm::GeometryCollectionType, te::gm::GeometryCollectionZMType, te::gm::GeometryCollectionZType, 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, and te::gm::PolygonZType.
Referenced by te::pgis::Transactor::addProperty().
|
inline |
It converts the PostgreSQL index string to a TerraLib index type.
t | PostgreSQL index name (A NULL terminated string). |
The equivalent TerraLib foreign key modifier type.
Definition at line 141 of file Utils.h.
References te::da::B_TREE_TYPE, te::da::HASH_TYPE, and te::da::R_TREE_TYPE.
Referenced by te::pgis::Transactor::getIndex(), and te::pgis::Transactor::getIndexes().
std::string te::pgis::GetLoadDataRow | ( | const te::da::DataSetType * | dt, |
te::da::DataSet * | d, | ||
PGconn * | conn | ||
) |
Definition at line 640 of file Utils.cpp.
References te::dt::CompositeProperty::getProperty(), GetSQLValue(), and te::dt::CompositeProperty::size().
const char * te::pgis::GetPGEncoding | ( | te::common::CharEncoding | encoding | ) |
Definition at line 662 of file Utils.cpp.
References sg_pg_encoding.
Referenced by te::pgis::ConnectionPool::initialize().
|
inline |
It converts the spatial relationship to PostGIS dialect.
rel | The spatial relationship. |
Definition at line 803 of file Utils.h.
References te::gm::CONTAINS, te::gm::COVEREDBY, te::gm::COVERS, te::gm::CROSSES, te::gm::DISJOINT, te::gm::EQUALS, te::gm::INTERSECTS, te::gm::OVERLAPS, te::gm::TOUCHES, and te::gm::WITHIN.
Referenced by te::pgis::Transactor::getDataSet().
std::string te::pgis::GetSQLBindValues | ( | std::size_t | nproperties | ) |
Definition at line 455 of file Utils.cpp.
Referenced by te::pgis::Transactor::add().
std::string te::pgis::GetSQLValue | ( | const te::dt::Property * | p, |
std::size_t | propertyPos, | ||
te::da::DataSet * | d, | ||
PGconn * | conn | ||
) |
Definition at line 510 of file Utils.cpp.
References te::common::Binary2Hex(), 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::da::DataSet::getBool(), te::da::DataSet::getByteArray(), te::da::DataSet::getChar(), te::da::DataSet::getDateTime(), te::da::DataSet::getDouble(), te::da::DataSet::getFloat(), te::da::DataSet::getGeometry(), te::da::DataSet::getInt16(), te::da::DataSet::getInt32(), te::da::DataSet::getInt64(), te::da::DataSet::getNumeric(), te::da::DataSet::getString(), te::dt::Property::getType(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::dt::NUMERIC_TYPE, te::dt::STRING_TYPE, and TE_TR.
Referenced by GetLoadDataRow(), and GetSQLValues().
std::string te::pgis::GetSQLValues | ( | const te::da::DataSetType * | dt, |
te::da::DataSet * | d, | ||
PGconn * | conn | ||
) |
Definition at line 491 of file Utils.cpp.
References te::dt::CompositeProperty::getProperty(), GetSQLValue(), and te::dt::CompositeProperty::size().
te::common::CharEncoding te::pgis::GetTeEncoding | ( | const char *const | encoding | ) |
Definition at line 667 of file Utils.cpp.
References sg_n_encoding, sg_pg_encoding, and te::common::UNKNOWN_CHAR_ENCODING.
Referenced by te::pgis::Transactor::getEncoding().
|
inline |
It returns a DateTime type from a date loaded by PostgreSQL.
It returns a DateTime type from a date loaded by PostgreSQL. Internelly, PostgreSQL stores julian dates in 4 bytes, so this function has to convert it to gregorian date. Besides that, PostgreSQL stores date as seconds before or after midnight 2000-01-01. Therefore, this function has to sum the number of seconds (2451545 seconds) between 01-01-01 00:00:00 and 01-01-2000 00:00:00 to the date.
dDate | A julian date in seconds loaded by PostgreSQL. |
return | A gregorian date from the input julian date. |
Definition at line 343 of file Utils.h.
References Julian2Date().
Referenced by te::pgis::DataSet::getDateTime(), and Internal2TimeStamp().
|
inline |
It returns a DateTime type from a time loaded by PostgreSQL.
It returns a DateTime type from a time loaded by PostgreSQL. Internelly, PostgreSQL stores time as seconds.
tval | The amount of seconds loaded by PostgreSQL. |
return | A time (hour, minute, second) from the input amount of seconds. |
Definition at line 362 of file Utils.h.
Referenced by te::pgis::DataSet::getDateTime(), and Internal2TimeStamp().
|
inline |
It returns a DateTime type from a timestamp loaded by PostgreSQL.
It returns a DateTime type from a timestamp loaded by PostgreSQL. Internelly, PostgreSQL stores timestamp as seconds before or after midnight 2000-01-01.
ival | The timestamp, in seconds, loaded by PostgreSQL. |
return | A time instant from the input timestamp. |
Definition at line 413 of file Utils.h.
References Internal2Date(), and Internal2Time().
Referenced by te::pgis::DataSet::getDateTime().
|
inline |
Definition at line 377 of file Utils.h.
Referenced by te::pgis::DataSet::getDateTime().
|
inline |
It returns a gregorian date from a julian date (in seconds).
It returns a gregorian date from a julian date (in seconds).
jd | A julian date in seconds (INPUT). |
year | The year of a gregorian date that will be filled by this function (OUTPUT). |
month | The month of a gregorian date that will be filled by this function (OUTPUT). |
day | The day of a gregorian date that will be filled by this function (OUTPUT). |
Definition at line 304 of file Utils.h.
Referenced by Internal2Date().
std::string te::pgis::MakeConnectionStr | ( | const std::map< std::string, std::string > & | dsInfo | ) |
Definition at line 355 of file Utils.cpp.
Referenced by te::pgis::ConnectionPool::initialize().
void te::pgis::ScapeString | ( | PGconn * | conn, |
const std::string & | s, | ||
std::string & | output | ||
) |
|
inline |
Definition at line 48 of file Utils.cpp.
References te::dt::SimpleProperty::getDefaultValue(), te::dt::Property::getType(), te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::dt::SimpleProperty::isAutoNumber(), and te::dt::SimpleProperty::isRequired().
Referenced by te::pgis::Transactor::addProperty(), te::pgis::Transactor::changePropertyDefinition(), and SetColumnDef().
|
inline |
bool te::pgis::SetColumnDef | ( | std::string & | s, |
const te::dt::Property * | p, | ||
bool | justDataType = false |
||
) |
It writes the PostgreSQL column definition to the output string.
s | The string to output the column definition. |
p | The TerraLib propoerty type. |
Exception | It throws an exception if the data type is not mapped to the PostgreSQL type system. |
Definition at line 214 of file Utils.cpp.
References te::dt::ARRAY_TYPE, te::dt::BOOLEAN_TYPE, te::dt::BYTE_ARRAY_TYPE, te::dt::CHAR_TYPE, te::dt::DATE, te::dt::DATETIME_TYPE, te::dt::DOUBLE_TYPE, te::dt::FIXED_STRING, te::dt::FLOAT_TYPE, te::dt::GEOMETRY_TYPE, te::dt::StringProperty::getSubType(), te::dt::DateTimeProperty::getSubType(), te::dt::Property::getType(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::dt::NUMERIC_TYPE, SetColumnDef(), te::dt::StringProperty::size(), te::dt::STRING_TYPE, TE_TR, te::dt::TIME_DURATION, te::dt::TIME_INSTANT, te::dt::TIME_INSTANT_TZ, and te::dt::VAR_STRING.
|
inline |
Definition at line 100 of file Utils.cpp.
References te::common::Convert2String(), te::dt::SimpleProperty::getDefaultValue(), te::dt::SimpleProperty::isRequired(), and te::dt::StringProperty::size().
|
inline |
Definition at line 125 of file Utils.cpp.
References te::dt::SimpleProperty::getDefaultValue(), te::dt::ArrayProperty::getElementType(), te::dt::SimpleProperty::isRequired(), and SetColumnDef().
Referenced by SetColumnDef().
void te::pgis::SplitTableName | ( | const std::string & | fullName, |
const std::string * | defaultSchema, | ||
std::string & | schemaName, | ||
std::string & | tableName | ||
) |
Definition at line 417 of file Utils.cpp.
Referenced by te::pgis::Transactor::dropDataSet(), te::pgis::Transactor::getDataSetId(), te::pgis::Transactor::getGeometryInfo(), te::pgis::Transactor::getRasterInfo(), and te::pgis::Transactor::renameDataSet().