FDO .NET API Reference | Feature Data Objects |
00001 /* 00002 * Copyright (C) 2004-2006 Autodesk, Inc. 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of version 2.1 of the GNU Lesser 00006 * General Public License as published by the Free Software Foundation. 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Lesser General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public 00014 * License along with this library; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00016 * 00017 */ 00018 00019 #pragma once 00020 00021 #include "FDO\Commands\SQL\mgISQLDataReader.h" 00022 #include "FDO\Schema\mgDataType.h" 00023 #include "FDO\Schema\mgPropertyType.h" 00024 00025 class FdoISQLDataReader; 00026 00027 BEGIN_NAMESPACE_OSGEO_FDO_EXPRESSION 00028 public __gc class LOBValue; 00029 END_NAMESPACE_OSGEO_FDO_EXPRESSION 00030 00031 BEGIN_NAMESPACE_OSGEO_COMMON 00032 public __gc __interface IStreamReader; 00033 END_NAMESPACE_OSGEO_COMMON 00034 00035 BEGIN_NAMESPACE_OSGEO_FDO_COMMANDS_SQL 00036 00037 /// \ingroup (OSGeoFDOCommandsSQL) 00038 /// \brief 00039 /// The ISQLDataReaderImp class is a concrete implementation of ISQLDataReader. 00040 /// The ISQLDataReader interface provides a forward-only, read-only 00041 /// iterator for reading relational table data. A reference to an 00042 /// ISQLDataReader is returned from the SQLCommands ExecuteReader method. 00043 /// The initial position of the ISQLDataReader interface is prior to the first item. 00044 /// Thus, you must call ReadNext to begin accessing any data. 00045 private __gc class ISQLDataReaderImp : public NAMESPACE_OSGEO_RUNTIME::Disposable, 00046 public NAMESPACE_OSGEO_FDO_COMMANDS_SQL::ISQLDataReader 00047 { 00048 public: 00049 /// \brief 00050 /// Gets the number of columns in the result set. 00051 /// 00052 /// \return 00053 /// Returns the number of columns. 00054 /// 00055 System::Int32 GetColumnCount(); 00056 00057 /// \brief 00058 /// Gets the name of the column at the given ordinal position. 00059 /// 00060 /// \param index 00061 /// Input the position of the column. 00062 /// 00063 /// \return 00064 /// Returns the column name 00065 /// 00066 System::String* GetColumnName(System::Int32 index); 00067 00068 /// \brief 00069 /// Gets the data type of the column with the specified name. 00070 /// 00071 /// \param name 00072 /// Input the column name. 00073 /// 00074 /// \return 00075 /// Returns the type of the column. 00076 /// 00077 NAMESPACE_OSGEO_FDO_SCHEMA::DataType GetColumnType(System::String* name); 00078 00079 /// \brief 00080 /// Gets property type of the column with the specified name. This is used 00081 /// to indicate if a given column is a geometric property or a data property. If the column is 00082 /// a PropertyType_DataProperty, then GetColumnType can be used to find the data type of the column. 00083 /// 00084 /// \param name 00085 /// Input the column name. 00086 /// 00087 /// \return 00088 /// Returns property type of the column. 00089 /// 00090 NAMESPACE_OSGEO_FDO_SCHEMA::PropertyType GetPropertyType(System::String* name); 00091 00092 /// \brief 00093 /// Gets the Boolean value of the specified column. No conversion is 00094 /// performed, thus the column must be DataType_Boolean or an 00095 /// exception is thrown. 00096 /// 00097 /// \param name 00098 /// Input the column name. 00099 /// 00100 /// \return 00101 /// Returns the Boolean value 00102 /// 00103 System::Boolean GetBoolean(System::String* name); 00104 00105 /// \brief 00106 /// Gets the byte value of the specified column. No conversion is 00107 /// performed, thus the column must be DataType_Byte or an 00108 /// exception is thrown. 00109 /// 00110 /// \param name 00111 /// Input the column name. 00112 /// 00113 /// \return 00114 /// Returns the byte value. 00115 /// 00116 System::Byte GetByte(System::String* name); 00117 00118 /// \brief 00119 /// Gets the date time value of the specified column. No conversion 00120 /// is performed, thus the column must be DataType_DateTime or 00121 /// an exception is thrown. 00122 /// 00123 /// \param name 00124 /// Input the column name. 00125 /// 00126 /// \return 00127 /// Returns the date and time value. 00128 /// 00129 System::DateTime GetDateTime(System::String* name); 00130 00131 /// \brief 00132 /// Gets the double-precision floating point value of the specified column. 00133 /// No conversion is performed, thus the column must be of type 00134 /// Double or an exception is thrown. 00135 /// 00136 /// \param name 00137 /// Input the column name. 00138 /// 00139 /// \return 00140 /// Returns the double value. 00141 /// 00142 System::Double GetDouble(System::String* name); 00143 00144 /// \brief 00145 /// Gets the signed 16-bit integer value of the specified column. No conversion is 00146 /// performed, thus the column must be DataType_Int16 or an 00147 /// exception is thrown. 00148 /// 00149 /// \param name 00150 /// Input the column name. 00151 /// 00152 /// \return 00153 /// Returns the Int16 value. 00154 /// 00155 System::Int16 GetInt16(System::String* name); 00156 00157 /// \brief 00158 /// Gets the signed 32-bit integer value of the specified column. No conversion is 00159 /// performed, thus the column must be DataType_Int32 or an 00160 /// exception is thrown. 00161 /// 00162 /// \param name 00163 /// Input the column name. 00164 /// 00165 /// \return 00166 /// Returns the Int32 value. 00167 /// 00168 System::Int32 GetInt32(System::String* name); 00169 00170 /// \brief 00171 /// Gets the signed 64-bit integer value of the specified column. No conversion 00172 /// is performed, thus the column must be DataType_Int64 or an 00173 /// exception is thrown. 00174 /// 00175 /// \param name 00176 /// Input the column name. 00177 /// 00178 /// \return 00179 /// Returns the Int64 value. 00180 /// 00181 System::Int64 GetInt64(System::String* name); 00182 00183 /// \brief 00184 /// Gets the single-precision floating point value of the specified column. 00185 /// No conversion is performed, thus the column must be DataType_Single 00186 /// or an exception is thrown. 00187 /// 00188 /// \param name 00189 /// Input the column name. 00190 /// 00191 /// \return 00192 /// Returns the single value 00193 /// 00194 System::Single GetSingle(System::String* name); 00195 00196 /// \brief 00197 /// Gets the string value of the specified column. No conversion is 00198 /// performed, thus the column must be DataType_String or an 00199 /// exception is thrown. 00200 /// 00201 /// \param name 00202 /// Input the column name. 00203 /// 00204 /// \return 00205 /// Returns the string value. 00206 /// 00207 System::String* GetString(System::String* name); 00208 00209 /// \brief 00210 /// Gets a LOBValue reference. The LOB is fully read in and data available. 00211 /// Because no conversion is performed, the property must be DataType_BLOB or 00212 /// DataType_CLOB etc. (a LOB type) 00213 /// 00214 /// \param name 00215 /// Input the property name. 00216 /// 00217 /// \return 00218 /// Returns the reference to LOBValue 00219 /// 00220 NAMESPACE_OSGEO_FDO_EXPRESSION::LOBValue* GetLOB(System::String* name); 00221 00222 /// \brief 00223 /// Gets a reference of the specified LOB property as a BLOBStreamReader or 00224 /// CLOBStreamReader etc. to allow reading in blocks of data. 00225 /// Because no conversion is performed, the property must be DataType_BLOB 00226 /// or DataType_CLOB etc. (a LOB type) 00227 /// Cast the IStreamReader to the appropiate LOB Stream Reader. 00228 /// 00229 /// \param name 00230 /// Input the property name. 00231 /// 00232 /// \return 00233 /// Returns a reference to a LOB stream reader 00234 /// 00235 NAMESPACE_OSGEO_COMMON::IStreamReader* GetLOBStreamReader(System::String* name); 00236 00237 /// \brief 00238 /// Returns true if the value of the specified column is null. 00239 /// 00240 /// \param name 00241 /// Input the column name. 00242 /// 00243 /// \return 00244 /// Returns true if the value is null. 00245 /// 00246 System::Boolean IsNull(System::String* name); 00247 00248 /// \brief 00249 /// Gets the geometry value of the specified column as a byte array 00250 /// in FGF format. No conversion is performed, thus the column 00251 /// must be of Geometric type or an exception is thrown. 00252 /// 00253 /// \param name 00254 /// Input the column name. 00255 /// 00256 /// \return 00257 /// Returns the FGF byte array value. 00258 /// 00259 System::Byte GetGeometry(System::String* name) []; 00260 00261 /// \brief 00262 /// Advances the reader to the next item. The default position of the 00263 /// reader is prior to the first item. Thus, you must call ReadNext 00264 /// to begin accessing any data. 00265 /// 00266 /// \return 00267 /// Returns true if there is a next item. 00268 /// 00269 System::Boolean ReadNext(); 00270 00271 /// \brief 00272 /// Closes the ISQLDataReader object, freeing any resources it may be holding. 00273 /// 00274 /// \return 00275 /// Returns nothing 00276 /// 00277 System::Void Close(); 00278 00279 /// \cond DOXYGEN-IGNORE 00280 protected: 00281 __sealed System::Void ReleaseUnmanagedObject(); 00282 /// \endcond 00283 00284 public private: 00285 ISQLDataReaderImp(System::IntPtr unmanaged, System::Boolean autoDelete) : NAMESPACE_OSGEO_RUNTIME::Disposable(unmanaged, autoDelete) 00286 { 00287 00288 } 00289 00290 inline FdoISQLDataReader* GetImpObj() 00291 { 00292 return static_cast<FdoISQLDataReader*>(__super::UnmanagedObject.ToPointer()); 00293 } 00294 }; 00295 00296 END_NAMESPACE_OSGEO_FDO_COMMANDS_SQL 00297 00298
Comments or suggestions? Send us feedback. |