Skip to content
Permalink
Browse files
[virtual layer] Fix xFilter for null value comparisons
  • Loading branch information
Hugo Mercier committed Dec 5, 2016
1 parent 77bbeaa commit 89461909d3a72b48c0cfffb3da6dfe62059d147a
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/providers/virtual/qgsvirtuallayersqlitemodule.cpp
@@ -624,13 +624,13 @@ int vtableFilter( sqlite3_vtab_cursor * cursor, int idxNum, const char *idxStr,
expr += "'" + str.replace( QLatin1String( "'" ), QLatin1String( "''" ) ) + "'";
break;
}
case SQLITE_NULL:
case SQLITE_BLOB: // comparison to blob ignored
default:
expr = QLatin1String( "" );
}
if ( !expr.isEmpty() )
{
request.setFilterExpression( expr );
expr += QLatin1String( " is null" );
break;
}
request.setFilterExpression( expr );
}
VTableCursor *c = reinterpret_cast<VTableCursor*>( cursor );
c->filter( request );

0 comments on commit 8946190

Please sign in to comment.