FDO .NET API Reference Feature Data Objects

mgISQLDataReader.h

Go to the documentation of this file.
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\Schema\mgDataType.h"
00022 #include "FDO\Schema\mgPropertyType.h"
00023 
00024 BEGIN_NAMESPACE_OSGEO_FDO_EXPRESSION
00025 public __gc class LOBValue;
00026 END_NAMESPACE_OSGEO_FDO_EXPRESSION
00027 
00028 BEGIN_NAMESPACE_OSGEO_COMMON
00029 public __gc __interface IStreamReader;
00030 END_NAMESPACE_OSGEO_COMMON
00031 
00032 BEGIN_NAMESPACE_OSGEO_FDO_COMMANDS_SQL
00033 
00034 /// \ingroup (OSGeoFDOCommandsSQL)
00035 /// \interface OSGeo::FDO::Commands::SQL::ISQLDataReader
00036 /// \brief
00037 /// The ISQLDataReader interface provides a forward-only, read-only
00038 /// iterator for reading relational table data. A reference to an
00039 /// ISQLDataReader is returned from the SQLCommands ExecuteReader method.
00040 /// The initial position of the ISQLDataReader interface is prior to the first item.
00041 /// Thus, you must call ReadNext to begin accessing any data.
00042 public __gc __interface ISQLDataReader : public System::IDisposable
00043 {
00044 public:
00045     /// \brief
00046     /// Gets the number of columns in the result set.
00047     /// 
00048     /// \return
00049     /// Returns the number of columns.
00050     /// 
00051     System::Int32 GetColumnCount();
00052 
00053     /// \brief
00054     /// Gets the name of the column at the given ordinal position.
00055     /// 
00056     /// \param index 
00057     /// Input the position of the column.
00058     /// 
00059     /// \return
00060     /// Returns the column name
00061     /// 
00062     System::String* GetColumnName(System::Int32 index);
00063 
00064     /// \brief
00065     /// Gets the data type of the column with the specified name.
00066     /// 
00067     /// \param name 
00068     /// Input the column name.
00069     /// 
00070     /// \return
00071     /// Returns the type of the column.
00072     /// 
00073     NAMESPACE_OSGEO_FDO_SCHEMA::DataType GetColumnType(System::String* name);
00074 
00075     /// \brief
00076     /// Gets  property type of the column with the specified name. This is used
00077     /// to indicate if a given column is a geometric property or a data property. If the column is
00078     /// a PropertyType_DataProperty, then GetColumnType can be used to find the data type of the column.
00079     /// 
00080     /// \param name 
00081     /// Input the column name.
00082     /// 
00083     /// \return
00084     /// Returns  property type of the column.
00085     /// 
00086     NAMESPACE_OSGEO_FDO_SCHEMA::PropertyType GetPropertyType(System::String* name);
00087 
00088     /// \brief
00089     /// Gets the Boolean value of the specified column. No conversion is
00090     /// performed, thus the column must be DataType_Boolean or an
00091     /// exception is thrown.
00092     /// 
00093     /// \param name 
00094     /// Input the column name.
00095     /// 
00096     /// \return
00097     /// Returns the Boolean value
00098     /// 
00099     System::Boolean GetBoolean(System::String* name);
00100 
00101     /// \brief
00102     /// Gets the byte value of the specified column. No conversion is
00103     /// performed, thus the column must be DataType_Byte or an
00104     /// exception is thrown.
00105     /// 
00106     /// \param name 
00107     /// Input the column name.
00108     /// 
00109     /// \return
00110     /// Returns the byte value.
00111     /// 
00112     System::Byte GetByte(System::String* name);
00113 
00114     /// \brief
00115     /// Gets the date time value of the specified column. No conversion
00116     /// is performed, thus the column must be DataType_DateTime or
00117     /// an exception is thrown.
00118     /// 
00119     /// \param name 
00120     /// Input the column name.
00121     /// 
00122     /// \return
00123     /// Returns the date and time value.
00124     /// 
00125     System::DateTime GetDateTime(System::String* name);
00126 
00127     /// \brief
00128     /// Gets the double-precision floating point value of the specified column.
00129     /// No conversion is performed, thus the column must be of type
00130     /// Double or an exception is thrown.
00131     /// 
00132     /// \param name 
00133     /// Input the column name.
00134     /// 
00135     /// \return
00136     /// Returns the double value.
00137     /// 
00138     System::Double GetDouble(System::String* name);
00139 
00140     /// \brief
00141     /// Gets the signed 16-bit integer value of the specified column. No conversion is
00142     /// performed, thus the column must be DataType_Int16 or an
00143     /// exception is thrown.
00144     /// 
00145     /// \param name 
00146     /// Input the column name.
00147     /// 
00148     /// \return
00149     /// Returns the Int16 value.
00150     /// 
00151     System::Int16 GetInt16(System::String* name);
00152 
00153     /// \brief
00154     /// Gets the signed 32-bit integer value of the specified column. No conversion is
00155     /// performed, thus the column must be DataType_Int32 or an
00156     /// exception is thrown.
00157     /// 
00158     /// \param name 
00159     /// Input the column name.
00160     /// 
00161     /// \return
00162     /// Returns the Int32 value.
00163     /// 
00164     System::Int32 GetInt32(System::String* name);
00165 
00166     /// \brief
00167     /// Gets the signed 64-bit integer value of the specified column. No conversion
00168     /// is performed, thus the column must be DataType_Int64 or an
00169     /// exception is thrown.
00170     /// 
00171     /// \param name 
00172     /// Input the column name.
00173     /// 
00174     /// \return
00175     /// Returns the Int64 value.
00176     /// 
00177     System::Int64 GetInt64(System::String* name);
00178 
00179     /// \brief
00180     /// Gets the single-precision floating point value of the specified column.
00181     /// No conversion is performed, thus the column must be DataType_Single
00182     /// or an exception is thrown.
00183     /// 
00184     /// \param name 
00185     /// Input the column name.
00186     /// 
00187     /// \return
00188     /// Returns the single value
00189     /// 
00190     System::Single GetSingle(System::String* name);
00191 
00192     /// \brief
00193     /// Gets the string value of the specified column. No conversion is
00194     /// performed, thus the column must be DataType_String or an
00195     /// exception is thrown.
00196     /// 
00197     /// \param name 
00198     /// Input the column name.
00199     /// 
00200     /// \return
00201     /// Returns the string value.
00202     /// 
00203     System::String* GetString(System::String* name);
00204 
00205     /// \brief
00206     /// Gets a LOBValue reference. The LOB is fully read in and data available.
00207     /// Because no conversion is performed, the property must be DataType_BLOB or
00208     /// DataType_CLOB etc. (a LOB type)
00209     /// 
00210     /// \param name 
00211     /// Input the property name.
00212     /// 
00213     /// \return
00214     /// Returns the reference to LOBValue
00215     /// 
00216     NAMESPACE_OSGEO_FDO_EXPRESSION::LOBValue* GetLOB(System::String* name);
00217 
00218     /// \brief
00219     /// Gets a reference of the specified LOB property as a BLOBStreamReader or
00220     /// CLOBStreamReader etc. to allow reading in blocks of data.
00221     /// Because no conversion is performed, the property must be DataType_BLOB 
00222     /// or DataType_CLOB etc. (a LOB type)
00223     /// Cast the IStreamReader to the appropiate LOB Stream Reader.
00224     /// 
00225     /// \param name 
00226     /// Input the property name.
00227     /// 
00228     /// \return
00229     /// Returns a reference to a LOB stream reader
00230     /// 
00231     NAMESPACE_OSGEO_COMMON::IStreamReader* GetLOBStreamReader(System::String* name);
00232 
00233     /// \brief
00234     /// Returns true if the value of the specified column is null.
00235     /// 
00236     /// \param name 
00237     /// Input the column name.
00238     /// 
00239     /// \return
00240     /// Returns true if the value is null.
00241     /// 
00242     System::Boolean IsNull(System::String* name);
00243 
00244     /// \brief
00245     /// Gets the geometry value of the specified column as a byte array
00246     /// in FGF format. No conversion is performed, thus the column
00247     /// must be of Geometric type or an exception is thrown.
00248     /// 
00249     /// \param name 
00250     /// Input the column name.
00251     /// 
00252     /// \return
00253     /// Returns the FGF byte array value.
00254     /// 
00255     System::Byte GetGeometry(System::String* name) [];
00256 
00257     /// \brief
00258     /// Advances the reader to the next item. The default position of the
00259     /// reader is prior to the first item. Thus, you must call ReadNext
00260     /// to begin accessing any data.
00261     /// 
00262     /// \return
00263     /// Returns true if there is a next item.
00264     /// 
00265     System::Boolean ReadNext();
00266 
00267     /// \brief
00268     /// Closes the ISQLDataReader object, freeing any resources it may be holding.
00269     /// 
00270     /// \return
00271     /// Returns nothing
00272     /// 
00273     System::Void Close();
00274 };
00275 
00276 END_NAMESPACE_OSGEO_FDO_COMMANDS_SQL
00277 
00278 

Comments or suggestions? Send us feedback.