Classes | |
class | BatchExecutor |
class | DataSource |
class | DataSourceCatalogLoader |
class | DataSourceTransactor |
class | EWKBSize |
class | FwDataSet |
class | Module |
class | PreparedQuery |
A class that implements a prepared query for the TerraLib SQLite Data Access Driver. More... | |
class | SQLVisitor |
A visitor for building an SQL statement using SQLite dialect. More... | |
Functions | |
void | BindValue (sqlite3_stmt *stmt, te::da::DataSet *d, std::size_t i, std::size_t propertyPos) |
te::da::DataSource * | Build () |
bool | ContainsSemicolon (const char *sql, std::size_t nbytes) |
void | Convert2SpatiaLiteGeom (const te::gm::GeomType t, std::string &geomType, std::string &dimension) |
std::string | Convert2SQLCreate (const te::dt::Property *p) |
te::da::DataSetType * | Convert2TerraLib (sqlite3_stmt *pStmt) |
te::dt::Property * | Convert2TerraLib (int colId, const std::string &colName, const std::string &colType, bool required, std::string *defaultValue=0) |
int | Convert2TerraLibCategory (const std::string &category) |
void | ExecuteScript (sqlite3 *db, const char *fileName) |
bool | Exists (const std::map< std::string, std::string > &dbInfo) |
te::da::FKActionType | GetAction (const std::string &action) |
std::string | GetBindableSpatialRelation (const std::string &colName, const te::gm::SpatialRelation r) |
int | GetConnectionFlags (const std::map< std::string, std::string > &connInfo) |
void | GetHiddenTables (const te::da::DataSource *ds, std::vector< std::string > &tables) |
std::string | GetRtreeFilter (const te::gm::Envelope *e, const te::gm::SpatialRelation r) |
std::string | GetSQLBindValues (const te::da::DataSet *dataset) |
std::string | GetSQLType (const te::dt::Property *p) |
bool | IsAllWhitespace (const char *sqlLine) |
bool | IsCommandTerminator (const char *sqlLine) |
bool | IsComplete (char **sql, size_t len, std::size_t &buffsize) |
void | PerformCommands (sqlite3 *db, std::istream &istr) |
void | PerformCommands (sqlite3 *db, const char *sql) |
std::streamsize | ReadLine (std::istream &istr, char **pbuff, std::size_t &buffsize) |
|
inline |
Definition at line 59 of file PreparedQuery.cpp.
References te::dt::BOOLEAN_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::getChar(), te::da::DataSet::getDateTime(), te::da::DataSet::getDouble(), te::sqlite::EWKBSize::getEWKBSize(), 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::da::DataSet::getUChar(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::da::DataSet::isNull(), te::dt::NUMERIC_TYPE, te::common::Globals::sm_machineByteOrder, te::dt::STRING_TYPE, TE_SQLITE_BOOL_FALSE, TE_SQLITE_BOOL_TRUE, and te::dt::UCHAR_TYPE.
Referenced by te::sqlite::PreparedQuery::bind().
|
inline |
Definition at line 36 of file DataSourceFactory.h.
Referenced by te::sqlite::Module::startup().
bool te::sqlite::ContainsSemicolon | ( | const char * | sql, |
std::size_t | nbytes | ||
) |
Definition at line 359 of file Utils.cpp.
Referenced by PerformCommands().
void te::sqlite::Convert2SpatiaLiteGeom | ( | const te::gm::GeomType | t, |
std::string & | geomType, | ||
std::string & | dimension | ||
) |
Definition at line 623 of file Utils.cpp.
References te::gm::GeometryCollectionMType, te::gm::GeometryCollectionType, te::gm::GeometryCollectionZMType, te::gm::GeometryCollectionZType, 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, and te::gm::PolygonZType.
Referenced by te::sqlite::DataSourceTransactor::addProperty(), te::sqlite::DataSourceTransactor::createDataSet(), and GetSQLType().
std::string te::sqlite::Convert2SQLCreate | ( | const te::dt::Property * | p | ) |
Definition at line 848 of file Utils.cpp.
References te::dt::Property::getName(), te::dt::Property::getParent(), te::da::DataSetType::getPrimaryKey(), te::da::PrimaryKey::getProperties(), GetSQLType(), te::da::PrimaryKey::has(), and te::dt::SimpleProperty::isRequired().
Referenced by te::sqlite::DataSourceTransactor::createDataSet().
te::da::DataSetType * te::sqlite::Convert2TerraLib | ( | sqlite3_stmt * | pStmt | ) |
Definition at line 433 of file Utils.cpp.
References te::da::DataSetType::add(), and te::ogr::Convert2TerraLib().
Referenced by te::sqlite::FwDataSet::FwDataSet(), te::sqlite::DataSourceCatalogLoader::getDataSetType(), and te::sqlite::DataSourceCatalogLoader::getProperties().
te::dt::Property * te::sqlite::Convert2TerraLib | ( | int | colId, |
const std::string & | colName, | ||
const std::string & | colType, | ||
bool | required, | ||
std::string * | defaultValue = 0 |
||
) |
Definition at line 452 of file Utils.cpp.
References te::dt::BOOLEAN_TYPE, te::dt::BYTE_ARRAY_TYPE, te::common::Convert2UCase(), te::dt::DATE, te::dt::DOUBLE_TYPE, te::gm::GeometryType, te::dt::INT64_TYPE, te::gm::Geometry::isGeomType(), te::dt::STRING, te::dt::TIME_INSTANT, te::dt::UNKNOWN, and te::dt::UNKNOWN_TYPE.
int te::sqlite::Convert2TerraLibCategory | ( | const std::string & | category | ) |
Definition at line 522 of file Utils.cpp.
References te::da::INDEX_TYPE, te::da::TABLE_TYPE, te::da::TRIGGER_TYPE, te::da::UNKNOWN_DATASET_TYPE, and te::da::VIEW_TYPE.
Referenced by te::sqlite::DataSourceCatalogLoader::getDataSetType().
void te::sqlite::ExecuteScript | ( | sqlite3 * | db, |
const char * | fileName | ||
) |
Definition at line 139 of file Utils.cpp.
References PerformCommands().
Referenced by te::sqlite::BatchExecutor::execute().
bool te::sqlite::Exists | ( | const std::map< std::string, std::string > & | dbInfo | ) |
Definition at line 101 of file Utils.cpp.
References GetConnectionFlags().
Referenced by te::sqlite::DataSource::create(), and te::sqlite::DataSource::drop().
te::da::FKActionType te::sqlite::GetAction | ( | const std::string & | action | ) |
Definition at line 824 of file Utils.cpp.
References te::da::CASCADE, te::da::NO_ACTION, te::da::RESTRICT, te::da::SET_DEFAULT, and te::da::SET_NULL.
Referenced by te::sqlite::DataSourceTransactor::getForeignKey().
std::string te::sqlite::GetBindableSpatialRelation | ( | const std::string & | colName, |
const te::gm::SpatialRelation | r | ||
) |
Definition at line 574 of file Utils.cpp.
References te::gm::CONTAINS, 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::sqlite::DataSourceTransactor::getDataSet().
int te::sqlite::GetConnectionFlags | ( | const std::map< std::string, std::string > & | connInfo | ) |
Definition at line 63 of file Utils.cpp.
Referenced by Exists(), and te::sqlite::DataSource::open().
void te::sqlite::GetHiddenTables | ( | const te::da::DataSource * | ds, |
std::vector< std::string > & | tables | ||
) |
Definition at line 392 of file Utils.cpp.
References te::common::Convert2UCase(), te::da::DataSource::getConnectionInfo(), and te::common::Tokenize().
Referenced by te::sqlite::DataSourceCatalogLoader::getDataSets().
std::string te::sqlite::GetRtreeFilter | ( | const te::gm::Envelope * | e, |
const te::gm::SpatialRelation | r | ||
) |
Definition at line 536 of file Utils.cpp.
References te::gm::CONTAINS, te::gm::CROSSES, te::gm::EQUALS, te::gm::INTERSECTS, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::gm::OVERLAPS, te::gm::TOUCHES, and te::gm::WITHIN.
std::string te::sqlite::GetSQLBindValues | ( | const te::da::DataSet * | dataset | ) |
Definition at line 874 of file Utils.cpp.
References te::da::DataSet::getNumProperties().
Referenced by te::sqlite::DataSourceTransactor::add().
std::string te::sqlite::GetSQLType | ( | const te::dt::Property * | p | ) |
Definition at line 769 of file Utils.cpp.
References te::dt::BYTE_ARRAY_TYPE, te::dt::CHAR_TYPE, Convert2SpatiaLiteGeom(), te::dt::DATETIME_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::GEOMETRY_TYPE, te::gm::GeometryProperty::getGeometryType(), te::dt::Property::getType(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::dt::NUMERIC_TYPE, te::dt::STRING_TYPE, te::dt::TIME_INSTANT, and te::dt::UCHAR_TYPE.
Referenced by te::sqlite::DataSourceTransactor::addProperty(), and Convert2SQLCreate().
bool te::sqlite::IsAllWhitespace | ( | const char * | sqlLine | ) |
Definition at line 304 of file Utils.cpp.
Referenced by IsCommandTerminator(), and PerformCommands().
bool te::sqlite::IsCommandTerminator | ( | const char * | sqlLine | ) |
Definition at line 345 of file Utils.cpp.
References IsAllWhitespace().
Referenced by PerformCommands().
bool te::sqlite::IsComplete | ( | char ** | sql, |
size_t | len, | ||
std::size_t & | buffsize | ||
) |
Definition at line 368 of file Utils.cpp.
References TE_SQLITE_BUFFER_SCRIPT_SIZE.
Referenced by PerformCommands().
void te::sqlite::PerformCommands | ( | sqlite3 * | db, |
std::istream & | istr | ||
) |
Definition at line 161 of file Utils.cpp.
References ContainsSemicolon(), IsAllWhitespace(), IsCommandTerminator(), IsComplete(), ReadLine(), and TE_SQLITE_BUFFER_SCRIPT_SIZE.
Referenced by te::sqlite::BatchExecutor::execute(), and ExecuteScript().
void te::sqlite::PerformCommands | ( | sqlite3 * | db, |
const char * | sql | ||
) |
std::streamsize te::sqlite::ReadLine | ( | std::istream & | istr, |
char ** | pbuff, | ||
std::size_t & | buffsize | ||
) |
Definition at line 277 of file Utils.cpp.
References TE_SQLITE_BUFFER_SCRIPT_SIZE.
Referenced by PerformCommands().