FDO API Reference | Feature Data Objects |
00001 #ifndef _ISELECTAGGREGATES_H_ 00002 #define _ISELECTAGGREGATES_H_ 00003 // 00004 00005 // 00006 // Copyright (C) 2004-2006 Autodesk, Inc. 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of version 2.1 of the GNU Lesser 00010 // General Public License as published by the Free Software Foundation. 00011 // 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 // Lesser General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU Lesser General Public 00018 // License along with this library; if not, write to the Free Software 00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 // 00021 00022 #ifdef _WIN32 00023 #pragma once 00024 #endif 00025 00026 #include <FdoStd.h> 00027 #include <Fdo/Commands/IFeatureCommand.h> 00028 #include <Fdo/Connections/IConnection.h> 00029 #include <Fdo/Commands/Feature/IDataReader.h> 00030 #include <Fdo/Commands/IdentifierCollection.h> 00031 #include <Fdo/Commands/OrderingOption.h> 00032 #include <Fdo/Commands/Feature/IBaseSelect.h> 00033 00034 /// \brief 00035 /// The FdoISelectAggregate interface defines a Select command that handle selection of properties that include 00036 /// the use of aggregate functions. This command differs from the FdoISelect command in a number of ways. 00037 /// It handles selection of properties that are aggregate functions and supports selecting distinct property values. 00038 /// It also includes grouping criteria. The execute method returns an IDataReader which is not tied to a specific class. 00039 /// Unlike Select, FdoISelectAggregate does not include any locking functions. 00040 class FdoISelectAggregates : public FdoIBaseSelect 00041 { 00042 friend class FdoIConnection; 00043 00044 public: 00045 /// \brief 00046 /// Executes the select command and returns a reference to an FdoIDataReader. 00047 /// 00048 /// \return 00049 /// Returns the data reader. 00050 /// 00051 FDO_API virtual FdoIDataReader* Execute() = 0; 00052 00053 /// \brief 00054 /// Set the distinct option of the selection. 00055 /// Non-simple properties such as object properties, geometry properties, raster properties, association properties, etc. will not be supported with Distinct. 00056 /// 00057 /// \param value 00058 /// true or false; when set to true, only distinct values are returned. Otherwise all values are returned 00059 /// 00060 /// \return 00061 /// Returns nothing 00062 /// 00063 /// \note 00064 /// Grouping criteria is not supported with Distinct. 00065 FDO_API virtual void SetDistinct( bool value ) = 0; 00066 00067 /// \brief 00068 /// Get the distinct option. 00069 /// 00070 /// \return 00071 /// Returns true if distinct is set, false otherwise. 00072 /// 00073 FDO_API virtual bool GetDistinct( ) = 0; 00074 00075 /// \brief 00076 /// Gets the FdoIdentifierCollection that holds the list of group by property names. If empty no grouping is used. This list is initially 00077 /// empty and the caller need to add the property that the command should use as a group by criteria. No LOB or Geometry type properties 00078 /// can be used for ordering. 00079 /// 00080 /// \return 00081 /// Returns the list of group by property names. 00082 /// 00083 FDO_API virtual FdoIdentifierCollection* GetGrouping() = 0; 00084 00085 /// \brief 00086 /// Set the grouping by filter. Use the grouping filter to restrict the groups of returned properties to those groups for 00087 /// which the specified filter is TRUE. For example "order by city" and "min(lanes) = 2". The FdoFilter have to evalute to a 00088 /// binary value(true or false). 00089 /// 00090 /// \param filter 00091 /// The grouping filter. 00092 /// 00093 /// \return 00094 /// Returns nothing 00095 /// 00096 FDO_API virtual void SetGroupingFilter( FdoFilter* filter ) = 0; 00097 00098 /// \brief 00099 /// Gets the grouping by filter. 00100 /// 00101 /// \return 00102 /// Returns the grouping filter. 00103 /// 00104 FDO_API virtual FdoFilter* GetGroupingFilter( ) = 0; 00105 }; 00106 #endif 00107 00108
Comments or suggestions? Send us feedback. |