[fdo-commits] r2555 - trunk/Providers/GenericRdbms/Src/Fdo/Filter
svn_fdo at osgeo.org
svn_fdo at osgeo.org
Mon Feb 19 18:16:10 EST 2007
Author: thomasknoell
Date: 2007-02-19 18:16:09 -0500 (Mon, 19 Feb 2007)
New Revision: 2555
Modified:
trunk/Providers/GenericRdbms/Src/Fdo/Filter/FdoRdbmsFilterProcessor.cpp
trunk/Providers/GenericRdbms/Src/Fdo/Filter/FdoRdbmsFilterProcessor.h
Log:
Required changes in the context of removing additional identity columns as part of the reader returned by the SelectAggregates command.
Modified: trunk/Providers/GenericRdbms/Src/Fdo/Filter/FdoRdbmsFilterProcessor.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/Fdo/Filter/FdoRdbmsFilterProcessor.cpp 2007-02-19 23:15:07 UTC (rev 2554)
+++ trunk/Providers/GenericRdbms/Src/Fdo/Filter/FdoRdbmsFilterProcessor.cpp 2007-02-19 23:16:09 UTC (rev 2555)
@@ -992,7 +992,6 @@
}
}
-
bool FdoRdbmsFilterProcessor::ContainsAggregateFunctions( FdoIdentifierCollection *identifiers )
{
class FindAggregate : public FdoRdbmsBaseFilterProcessor
@@ -1043,7 +1042,6 @@
return false;
}
-
void FdoRdbmsFilterProcessor::PrependTables()
{
// Prepend the from clause as: table1,table2,table3 And make sure a given table will only appear once
@@ -1191,8 +1189,13 @@
//
// The implementation of the public method that converts FDO filter to dbi SQL strings.
-const wchar_t* FdoRdbmsFilterProcessor::FilterToSql( FdoFilter *filter, const wchar_t *className, SqlCommandType cmdType, FdoCommandType callerFdoCommand, FdoRdbmsFilterUtilConstrainDef *inFilterConstrain,
- bool forUpdate )
+const wchar_t* FdoRdbmsFilterProcessor::FilterToSql( FdoFilter *filter,
+ const wchar_t *className,
+ SqlCommandType cmdType,
+ FdoCommandType callerFdoCommand,
+ FdoRdbmsFilterUtilConstrainDef *inFilterConstrain,
+ bool forUpdate,
+ FdoInt16 callerId )
{
int j;
@@ -1533,7 +1536,9 @@
// the featid column.
// Also if the we have a distinct clause, we should not be adding any columns as that will
// change the returned result.
- if( (! isFeatIdOnlyQuery && ! filterConstraint->distinct) && !( useAggregateFunctions && !mRequiresDistinct ))
+ if( (! isFeatIdOnlyQuery && ! filterConstraint->distinct) &&
+ !( useAggregateFunctions && !mRequiresDistinct ) &&
+ !( callerId == FdoCommandType_SelectAggregates && !mRequiresDistinct ) )
{
FdoStringP sqlTableName = mDbiConnection->GetSchemaUtil()->GetDbObjectSqlName(mDbiConnection->GetSchemaUtil()->GetClass(mCurrentClassName));
const wchar_t* table = GetTableAlias(sqlTableName);
Modified: trunk/Providers/GenericRdbms/Src/Fdo/Filter/FdoRdbmsFilterProcessor.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/Fdo/Filter/FdoRdbmsFilterProcessor.h 2007-02-19 23:15:07 UTC (rev 2554)
+++ trunk/Providers/GenericRdbms/Src/Fdo/Filter/FdoRdbmsFilterProcessor.h 2007-02-19 23:16:09 UTC (rev 2555)
@@ -288,7 +288,7 @@
bool CanOptimizeRelationQuery( const FdoSmLpClassDefinition* pClass, const FdoSmLpPropertyDefinition* propertyDefinition );
- virtual const wchar_t* FilterToSql( FdoFilter *filter, const wchar_t *className, SqlCommandType cmdType, FdoCommandType callerFdoCommand, FdoRdbmsFilterUtilConstrainDef *filterConstrain = NULL, bool forUpdate = false );
+ virtual const wchar_t* FilterToSql( FdoFilter *filter, const wchar_t *className, SqlCommandType cmdType, FdoCommandType callerFdoCommand, FdoRdbmsFilterUtilConstrainDef *filterConstrain = NULL, bool forUpdate = false, FdoInt16 callerId = FdoCommandType_Select );
FdoRdbmsSecondarySpatialFilterCollection * GetGeometricConditions() { return FDO_SAFE_ADDREF(mSecondarySpatialFilters.p); }
};
More information about the fdo-commits
mailing list