plugins do not need to store nulls / save space - refs #1644

This commit is contained in:
Dane Springmeyer 2013-04-11 16:05:29 -07:00
parent 6691267d7a
commit 9da1f35b5e
3 changed files with 7 additions and 7 deletions

View file

@ -123,11 +123,9 @@ feature_ptr postgis_featureset::next()
{
std::string name = rs_->getFieldName(pos);
if (rs_->isNull(pos))
{
feature->put(name, mapnik::value_null());
}
else
// NOTE: we intentionally do not store null here
// since it is equivalent to the attribute not existing
if (!rs_->isNull(pos))
{
const char* buf = rs_->getValue(pos);
const int oid = rs_->getTypeOID(pos);

View file

@ -162,7 +162,8 @@ void dbf_file::add_attribute(int col, mapnik::transcoder const& tr, mapnik::feat
{
if (record_[fields_[col].offset_] == '*')
{
f.put(name,mapnik::value_null());
// NOTE: we intentionally do not store null here
// since it is equivalent to the attribute not existing
break;
}
if ( fields_[col].dec_>0 )

View file

@ -123,7 +123,8 @@ feature_ptr sqlite_featureset::next()
case SQLITE_NULL:
{
feature->put(fld_name_str, mapnik::value_null());
// NOTE: we intentionally do not store null here
// since it is equivalent to the attribute not existing
break;
}