// // Copyright(C) 2007 Refractions Research, Inc. // // This library is free software; you can redistribute it and/or // modify it under the terms of version 2.1 of the GNU Lesser // General Public License as published by the Free Software Foundation. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // #ifndef FDOPOSTGIS_SCHEMACAPABILITIES_H_INCLUDED #define FDOPOSTGIS_SCHEMACAPABILITIES_H_INCLUDED namespace fdo { namespace postgis { /// Implementation of interface describing schema capabilities /// supported by PostGIS provider. /// class SchemaCapabilities : public FdoISchemaCapabilities { public: /// Default constructor. SchemaCapabilities(); // // FdoISchemaCapabilities interface // /// Return array of the FdoClassType objects the feature provider supports. FdoClassType* GetClassTypes(FdoInt32& size); /// Return array of the FdoDataType objects the feature provider supports. FdoDataType* GetDataTypes(FdoInt32& size); /// Return the maximum supported length of String, BLOB, or CLOB data properties. FdoInt64 GetMaximumDataValueLength(FdoDataType type); /// Return the maximum supported precision for a decimal data property. FdoInt32 GetMaximumDecimalPrecision(); /// Return the maximum supported scale for a decimal data property. FdoInt32 GetMaximumDecimalScale(); /// Return the maximum size of a value of the given type. FdoInt32 GetNameSizeLimit(FdoSchemaElementNameType name); /// Return string that includes all the reserved characters that cannot be /// used for the various schema element names for the provider. FdoString* GetReservedCharactersForName(); /// Return array of the FdoDataType objects the feature provider /// supports for auto-generation. FdoDataType* GetSupportedAutoGeneratedTypes(FdoInt32& size); /// Return list of property types that can be used for identity properties. FdoDataType* GetSupportedIdentityPropertyTypes(FdoInt32& size); /// Determine if the provider supports association property. bool SupportsAssociationProperties(); /// Determine if the provider can auto-generate unique ID values for a class. bool SupportsAutoIdGeneration(); /// Determine if the provider supports multiple identity properties per class. bool SupportsCompositeId(); /// Determine if the provider supports composite unique value constraint. bool SupportsCompositeUniqueValueConstraints(); /// Determine if the provider can auto-generate unique ID values that are /// unique for the entire datastore, rather than just for a particular class. bool SupportsDataStoreScopeUniqueIdGeneration(); /// Return TRUE if default values can be specified for a data property definition, /// FALSE otherwise. bool SupportsDefaultValue(); /// Determine if the provider supports exclusive value range constraints. bool SupportsExclusiveValueRangeConstraints(); /// Determine if the provider supports inclusive value range constraints. bool SupportsInclusiveValueRangeConstraints(); /// Determine if the feature provider supports inheritance. bool SupportsInheritance(); /// Determine if the provider supports multiple schemas. bool SupportsMultipleSchemas(); /// Determine if the provider supports the network model. bool SupportsNetworkModel(); /// Determine if the provider supports nullable value constraint. bool SupportsNullValueConstraints(); /// Determine if the provider supports object properties. bool SupportsObjectProperties(); /// Determine if the provider support update a schema through the ApplySchema command. bool SupportsSchemaModification(); /// Determine if the provider supports Schema Mapping Overrides. /// The mapping overrides default rules for mapping Feature Schemas to provider-specific /// physical schemas. bool SupportsSchemaOverrides(); /// Determine if the provider supports unique value constraint. bool SupportsUniqueValueConstraints(); /// Determine if the provider supports value constraints list. bool SupportsValueConstraintsList(); protected: /// Destructor. virtual ~SchemaCapabilities(); // // FdoIDisposable interface // /// Dispose this object. void Dispose(); private: }; }} // namespace fdo::postgis #endif // FDOPOSTGIS_SCHEMACAPABILITIES_H_INCLUDED