Utility functions for the data access module. More...
#include "../../geometry/Enums.h"
#include "../../srs/Config.h"
#include "../datasource/DataSource.h"
#include "../query/Expression.h"
#include "../query/Fields.h"
#include "../query/Select.h"
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
#include <string>
#include <vector>
Go to the source code of this file.
Namespaces | |
te | |
TerraLib. | |
te::core | |
te::da | |
Namespace for the DataAccess API of TerraLib. | |
te::dt | |
Namespace for the Data Type module of TerraLib. | |
te::gm | |
Namespace for the Vector Geometry module of TerraLib. | |
te::rst | |
Namespace for the Raster module of TerraLib. | |
Functions | |
TEDATAACCESSEXPORT void | te::da::AssociateDataSetTypeConverterSRID (DataSetTypeConverter *converter, const int &inputSRID, const int &outputSRID=TE_UNKNOWN_SRS) |
TEDATAACCESSEXPORT std::unique_ptr< Fields > | te::da::BuildFields (const std::vector< std::string > &properties) |
TEDATAACCESSEXPORT std::unique_ptr< Select > | te::da::BuildSelect (const std::string &dsname) |
TEDATAACCESSEXPORT std::unique_ptr< Select > | te::da::BuildSelect (const std::string &dsname, const std::string &propertyName) |
TEDATAACCESSEXPORT std::unique_ptr< Select > | te::da::BuildSelect (const std::string &dsname, const std::vector< std::string > &properties) |
TEDATAACCESSEXPORT std::unique_ptr< Select > | te::da::BuildSelect (const std::string &dsname, const std::vector< std::string > &properties, const ObjectIdSet *oids) |
TEDATAACCESSEXPORT std::unique_ptr< Select > | te::da::BuildSelect (const std::string &dsname, const std::vector< std::string > &properties, const std::string &geometryProperty, const te::gm::Envelope *e, int srid, te::gm::SpatialRelation r) |
TEDATAACCESSEXPORT std::unique_ptr< Select > | te::da::BuildSelect (const std::string &dsname, const std::vector< std::string > &properties, const std::string &geometryProperty, te::gm::Geometry *g, te::gm::SpatialRelation r) |
TEDATAACCESSEXPORT std::unique_ptr< Expression > | te::da::BuildSpatialOp (Expression *e1, Expression *e2, te::gm::SpatialRelation r) |
TEDATAACCESSEXPORT void | te::da::Create (DataSource *ds, DataSetType *dt, DataSet *d, const std::map< std::string, std::string > &options, std::size_t limit=0) |
It creates the dataset definition in a data source and then fill it with data from the input dataset. More... | |
TEDATAACCESSEXPORT void | te::da::Create (DataSource *ds, DataSetType *dt, DataSet *d, std::size_t limit=0) |
It creates the dataset definition in a data source and then fill it with data from the input dataset. More... | |
TEDATAACCESSEXPORT DataSetAdapter * | te::da::CreateAdapter (DataSet *ds, DataSetTypeConverter *converter, bool isOwner=false) |
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSet > | te::da::CreateAdapterToHandlePersistence (const te::da::DataAccess *destinationDataAccess, te::da::DataSet *inputDataSet) |
//Creates an adapter to handle correctly the primary key and autonumber atributes. The adapter will handle the destruction of the dataSet More... | |
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSet > | te::da::CreateAdapterToHandlePersistence (const te::da::DataSetType *destinationDataSetType, const te::da::DataSourceCapabilities *capabilities, te::da::DataSet *inputDataSet) |
Creates a simplified version of the dataSetType based on the information present in the given dataSet. More... | |
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSetTypeConverter > | te::da::CreateConverterForDataSetType (const te::da::DataSetType *inputDataSetType, const te::da::DataSetType *outputDataSetType, const te::da::DataSourceCapabilities *outputCapabilities) |
Removes the auto-increment property from the converter. This is done to allow the destination dataSource to generated new values for each saved data. More... | |
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSetType > | te::da::CreateDataSetType (const std::string &dataSetName, te::da::DataSet *dataSet) |
Creates a FieldNameValidator object based on the given DataSourceCapabilities. More... | |
TEDATAACCESSEXPORT te::da::FieldNameValidator | te::da::CreateValidator (const te::da::DataSourceCapabilities *capabilities) |
This function will prepare the given 'inputDataSetType' by validating the names of the properties of the dataSet and replacing them with fixed names if necessary (including possible repeated names after an adjust). The property order will not be changed. More... | |
TEDATAACCESSEXPORT te::dt::AbstractData * | te::da::DataAccessToStringConverter (te::dt::AbstractData *absData) |
Converts the String representtion of a DataAccess to the concrete class. More... | |
TEDATAACCESSEXPORT ObjectId * | te::da::GenerateOID (DataSet *dataset, const std::vector< std::string > &names) |
TEDATAACCESSEXPORT ObjectIdSet * | te::da::GenerateOIDSet (DataSet *dataset, const DataSetType *type) |
TEDATAACCESSEXPORT ObjectIdSet * | te::da::GenerateOIDSet (DataSet *dataset, const std::vector< std::string > &names) |
TEDATAACCESSEXPORT std::string | te::da::GetAliasName (std::string fullName) |
Get alias based on a input name. More... | |
TEDATAACCESSEXPORT std::string | te::da::getBasePkey (te::da::ObjectId *oid, std::pair< std::string, int > &dsProps) |
TEDATAACCESSEXPORT DataSet * | te::da::GetDataSet (const std::string &name, const std::string &datasourceId) |
TEDATAACCESSEXPORT std::string | te::da::GetDataSetCategoryName (int category) |
TEDATAACCESSEXPORT void | te::da::GetDataSetNames (std::vector< std::string > &datasetNames, const std::string &datasourceId) |
TEDATAACCESSEXPORT DataSetType * | te::da::GetDataSetType (const std::string &name, const std::string &datasourceId) |
TEDATAACCESSEXPORT DataSourcePtr | te::da::GetDataSource (const std::string &datasourceId, const bool opened=true) |
Search for a data source with the informed id in the DataSourceManager. More... | |
TEDATAACCESSEXPORT void | te::da::GetEmptyOIDSet (const DataSetType *type, ObjectIdSet *&set) |
Returns an empty ObjectIdSet, with the definitions of fields that compose it. More... | |
TEDATAACCESSEXPORT te::gm::Envelope * | te::da::GetExtent (const std::string &datasetName, const std::string &propertyName, const std::string &datasourceId) |
TEDATAACCESSEXPORT te::gm::GeometryProperty * | te::da::GetFirstGeomProperty (const DataSetType *dt) |
TEDATAACCESSEXPORT std::size_t | te::da::GetFirstPropertyPos (const te::da::DataSet *dataset, int datatype) |
TEDATAACCESSEXPORT te::rst::RasterProperty * | te::da::GetFirstRasterProperty (const DataSetType *dt) |
TEDATAACCESSEXPORT te::dt::Property * | te::da::GetFirstSpatialProperty (const DataSetType *dt) |
TEDATAACCESSEXPORT std::size_t | te::da::GetFirstSpatialPropertyPos (const te::da::DataSet *dataset) |
It returns the first dataset spatial property or NULL if none is found. More... | |
TEDATAACCESSEXPORT te::da::Literal * | te::da::GetLiteralFromAbstractData (const te::dt::AbstractData *abstractData) |
Creates the concrete literal class based on the given abstract data. More... | |
TEDATAACCESSEXPORT void | te::da::GetOIDDatasetProps (const DataSetType *type, std::pair< std::string, int > &dsProps) |
TEDATAACCESSEXPORT void | te::da::GetOIDPropertyNames (const DataSetType *type, std::vector< std::string > &pnames) |
TEDATAACCESSEXPORT void | te::da::GetOIDPropertyPos (const DataSetType *type, std::vector< std::size_t > &ppos) |
TEDATAACCESSEXPORT std::vector< int > | te::da::GetPropertyDataTypes (const te::da::DataSet *dataset) |
TEDATAACCESSEXPORT int | te::da::GetPropertyIndex (te::da::DataSet *dataSet, const std::string propName) |
TEDATAACCESSEXPORT void | te::da::GetPropertyInfo (const DataSet *const dataset, std::vector< std::string > &pnames, std::vector< int > &ptypes) |
TEDATAACCESSEXPORT void | te::da::GetPropertyInfo (const DataSetType *const dt, std::vector< std::string > &pnames, std::vector< int > &ptypes) |
TEDATAACCESSEXPORT std::size_t | te::da::GetPropertyPos (const DataSet *dataset, const std::string &name) |
TEDATAACCESSEXPORT std::size_t | te::da::GetPropertyPos (const DataSetType *dt, const std::string &name) |
TEDATAACCESSEXPORT std::string | te::da::GetSQLValueNames (const DataSet *dataset) |
TEDATAACCESSEXPORT std::string | te::da::GetSQLValueNames (const DataSetType *dt) |
TEDATAACCESSEXPORT std::string | te::da::GetSummarizedValue (const std::vector< std::string > &values, const std::string &sumary) |
It gets the summarized value. More... | |
TEDATAACCESSEXPORT double | te::da::GetSummarizedValue (std::vector< double > &values, const std::string &summary) |
It gets the summarized value. More... | |
TEDATAACCESSEXPORT double | te::da::GetValueAsDouble (const te::da::DataSet *ds, const size_t pos) |
It gets the value as double. More... | |
TEDATAACCESSEXPORT bool | te::da::HasDataSet (const std::string &datasourceId) |
TEDATAACCESSEXPORT bool | te::da::HasLinkedTable (te::da::DataSetType *type) |
It checks if the datasettype has a linked table. More... | |
TEDATAACCESSEXPORT bool | te::da::HasOption (const std::map< std::string, std::string > &options, const std::string &option) |
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSet > | te::da::HideColumns (te::da::DataSet *ds, te::da::DataSetType *dst, const std::vector< std::string > &columns) |
It hide columns of a DataSet using DataSetAdapter. More... | |
TEDATAACCESSEXPORT bool | te::da::IsValidName (const std::string &name, std::string &invalidChar) |
It checks if the name is not valid as the existence of invalid characters, reserved words, and others. More... | |
TEDATAACCESSEXPORT void | te::da::LoadFull (te::da::DataSetType *dataset, const std::string &datasourceId) |
TEDATAACCESSEXPORT void | te::da::LoadProperties (te::da::DataSetType *dataset, const std::string &datasourceId) |
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSetType > | te::da::PrepareDateSetType (const te::da::DataSetType *dataSetType, const te::da::DataSourceCapabilities *capabilities) |
Creates a converter between the given inputDataSetType and outputDataSetType. It handles different order of properties and different names in spatial property. It will handle limitations if the optional 'outputCapabilities' parameter is given. More... | |
TEDATAACCESSEXPORT void | te::da::RemoveAutoIncrementProperties (te::da::DataSetTypeConverter *converter) |
Converts a DataAccess to its String representation. More... | |
TEDATAACCESSEXPORT double | te::da::Round (const double &value, const size_t &precision) |
It gets the round value. More... | |
TEDATAACCESSEXPORT te::dt::AbstractData * | te::da::StringToDataAccessConverter (te::dt::AbstractData *absData) |
Utility functions for the data access module.
Definition in file Utils.h.