revert unintended change to sqlite in a7e150a593
This commit is contained in:
parent
46b16c917e
commit
c88fcc8f04
1 changed files with 10 additions and 19 deletions
|
@ -548,33 +548,24 @@ featureset_ptr sqlite_datasource::features(query const& q) const
|
|||
|
||||
std::ostringstream s;
|
||||
mapnik::context_ptr ctx = boost::make_shared<mapnik::context_type>();
|
||||
std::set<std::string> const& props = q.property_names();
|
||||
std::set<std::string>::const_iterator pos = props.begin();
|
||||
std::set<std::string>::const_iterator end = props.end();
|
||||
|
||||
s << "SELECT " << geometry_field_;
|
||||
if (!key_field_.empty())
|
||||
{
|
||||
s << "," << key_field_;
|
||||
ctx->push(key_field_);
|
||||
for ( ;pos != end;++pos)
|
||||
{
|
||||
if (*pos != key_field_)
|
||||
{
|
||||
s << ",[" << *pos << "]";
|
||||
ctx->push(*pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( ;pos != end;++pos)
|
||||
{
|
||||
s << ",[" << *pos << "]";
|
||||
ctx->push(*pos);
|
||||
}
|
||||
}
|
||||
std::set<std::string> const& props = q.property_names();
|
||||
std::set<std::string>::const_iterator pos = props.begin();
|
||||
std::set<std::string>::const_iterator end = props.end();
|
||||
|
||||
for ( ;pos != end;++pos)
|
||||
{
|
||||
// TODO - should we restrict duplicate key query?
|
||||
//if (*pos != key_field_)
|
||||
s << ",[" << *pos << "]";
|
||||
ctx->push(*pos);
|
||||
}
|
||||
s << " FROM ";
|
||||
|
||||
std::string query(table_);
|
||||
|
|
Loading…
Add table
Reference in a new issue