revert unintended change to sqlite in a7e150a593

This commit is contained in:
Dane Springmeyer 2012-04-03 16:33:06 -07:00
parent 46b16c917e
commit c88fcc8f04

View file

@ -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_);