[mapguide-commits] r8922 - sandbox/adsk/3.1n/Server/src/Services/Feature
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Apr 15 01:56:29 PDT 2016
Author: hubu
Date: 2016-04-15 01:56:29 -0700 (Fri, 15 Apr 2016)
New Revision: 8922
Modified:
sandbox/adsk/3.1n/Server/src/Services/Feature/SelectCommand.cpp
sandbox/adsk/3.1n/Server/src/Services/Feature/SelectCommand.h
Log:
Some providers such as Sqlite provider, CreateCommand(FdoCommandType_Select) will return a extended select command. So we need to check if it is really a extended select command before using it.
Modified: sandbox/adsk/3.1n/Server/src/Services/Feature/SelectCommand.cpp
===================================================================
--- sandbox/adsk/3.1n/Server/src/Services/Feature/SelectCommand.cpp 2016-04-15 08:26:53 UTC (rev 8921)
+++ sandbox/adsk/3.1n/Server/src/Services/Feature/SelectCommand.cpp 2016-04-15 08:56:29 UTC (rev 8922)
@@ -50,7 +50,7 @@
// For SDF/SHP providers, they do not support ordering. But, they can support ordering through the FdoIExtendedSelect
// command, provided that only a single property is being ordered on. So if it is the case that normal ordering is
// not supported, we should try for extended select if the conditions are met.
- bool bTryExtendedSelect = false;
+ m_bUseExtendedSelect = false;
if (NULL != options)
{
Ptr<MgStringCollection> orderProps = options->GetOrderingProperties();
@@ -65,7 +65,7 @@
{
if (FdoCommandType_ExtendedSelect == cmds[i] && orderProps->GetCount() == 1)
{
- bTryExtendedSelect = true;
+ m_bUseExtendedSelect = true;
break;
}
}
@@ -74,7 +74,7 @@
}
// Create FdoISelect command
- if (bTryExtendedSelect)
+ if (m_bUseExtendedSelect)
m_command = (FdoIExtendedSelect*)fdoConn->CreateCommand(FdoCommandType_ExtendedSelect);
else
m_command = (FdoISelect*)fdoConn->CreateCommand(FdoCommandType_Select);
@@ -219,7 +219,7 @@
CHECKNULL((FdoISelect*)m_command, L"MgSelectCommand.Execute");
FdoIExtendedSelect* extSelect = dynamic_cast<FdoIExtendedSelect*>(m_command.p);
- if (NULL != extSelect)
+ if (m_bUseExtendedSelect && NULL != extSelect)
{
FdoPtr<FdoIScrollableFeatureReader> scReader = extSelect->ExecuteScrollable();
CHECKNULL((FdoIScrollableFeatureReader*)scReader, L"MgSelectCommand.Execute");
Modified: sandbox/adsk/3.1n/Server/src/Services/Feature/SelectCommand.h
===================================================================
--- sandbox/adsk/3.1n/Server/src/Services/Feature/SelectCommand.h 2016-04-15 08:26:53 UTC (rev 8921)
+++ sandbox/adsk/3.1n/Server/src/Services/Feature/SelectCommand.h 2016-04-15 08:56:29 UTC (rev 8922)
@@ -80,6 +80,7 @@
FdoPtr<FdoFilter> m_filter;
MgFdoFilterCollection* GetSubFilters();
+ bool m_bUseExtendedSelect;
};
#endif
More information about the mapguide-commits
mailing list