sqlite: unquote fields to avoid filter failures - preliminary fix for #822
This commit is contained in:
parent
e13b608e6e
commit
5596ff5960
1 changed files with 4 additions and 1 deletions
|
@ -31,6 +31,7 @@
|
||||||
#include <mapnik/wkb.hpp>
|
#include <mapnik/wkb.hpp>
|
||||||
#include <mapnik/unicode.hpp>
|
#include <mapnik/unicode.hpp>
|
||||||
#include <mapnik/feature_factory.hpp>
|
#include <mapnik/feature_factory.hpp>
|
||||||
|
#include <mapnik/sql_utils.hpp>
|
||||||
|
|
||||||
// ogr
|
// ogr
|
||||||
#include "sqlite_featureset.hpp"
|
#include "sqlite_featureset.hpp"
|
||||||
|
@ -77,7 +78,9 @@ feature_ptr sqlite_featureset::next()
|
||||||
for (int i = 2; i < rs_->column_count (); ++i)
|
for (int i = 2; i < rs_->column_count (); ++i)
|
||||||
{
|
{
|
||||||
const int type_oid = rs_->column_type (i);
|
const int type_oid = rs_->column_type (i);
|
||||||
const char* fld_name = rs_->column_name (i);
|
// TODO - avoid copying string
|
||||||
|
// TODO - handle single quotes
|
||||||
|
const char* fld_name = mapnik::unquote_sql(rs_->column_name(i)).c_str();
|
||||||
|
|
||||||
switch (type_oid)
|
switch (type_oid)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue