+ parameter to specify the query columns use when getting back geaometries:
useful when you have big tables and you don't want to query long fields (long varchar2, blobs, anydata, clobs) which may cause slowdowns
This commit is contained in:
parent
20ffa2e7e6
commit
91fb08fbff
2 changed files with 3 additions and 1 deletions
|
@ -73,6 +73,7 @@ occi_datasource::occi_datasource(parameters const& params, bool bind)
|
|||
: datasource (params),
|
||||
type_(datasource::Vector),
|
||||
table_(*params_.get<std::string>("table","")),
|
||||
fields_(*params_.get<std::string>("fields","*")),
|
||||
geometry_field_(*params_.get<std::string>("geometry_field","")),
|
||||
extent_initialized_(false),
|
||||
desc_(*params_.get<std::string>("type"), *params_.get<std::string>("encoding","utf-8")),
|
||||
|
@ -194,7 +195,7 @@ void occi_datasource::bind() const
|
|||
// get columns description
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << "SELECT * FROM (" << table_name << ") WHERE rownum < 1";
|
||||
s << "SELECT " fields_ << " FROM (" << table_name << ") WHERE rownum < 1";
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -51,6 +51,7 @@ class occi_datasource : public mapnik::datasource
|
|||
private:
|
||||
int type_;
|
||||
mutable std::string table_;
|
||||
mutable std::string fields_;
|
||||
mutable std::string geometry_field_;
|
||||
mutable int srid_;
|
||||
mutable bool extent_initialized_;
|
||||
|
|
Loading…
Reference in a new issue