2 // System.Data.ProviderBase.DbDataReaderBase
5 // Tim Coleman (tim@timcoleman.com)
6 // Boris Kirzner (borisk@mainsoft.com)
8 // Copyright (C) Tim Coleman, 2003
12 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
13 // (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
15 // Permission is hereby granted, free of charge, to any person obtaining
16 // a copy of this software and associated documentation files (the
17 // "Software"), to deal in the Software without restriction, including
18 // without limitation the rights to use, copy, modify, merge, publish,
19 // distribute, sublicense, and/or sell copies of the Software, and to
20 // permit persons to whom the Software is furnished to do so, subject to
21 // the following conditions:
23 // The above copyright notice and this permission notice shall be
24 // included in all copies or substantial portions of the Software.
26 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
31 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 #if NET_2_0 || TARGET_JVM
37 using System.Collections;
38 using System.Data.Common;
39 using System.Runtime.InteropServices;
41 namespace System.Data.ProviderBase {
42 public abstract class DbDataReaderBase : DbDataReader
46 CommandBehavior behavior;
52 protected DbDataReaderBase (CommandBehavior behavior)
54 this.behavior = behavior;
57 #endregion // Constructors
61 protected CommandBehavior CommandBehavior {
62 get { return behavior; }
65 public override int Depth {
66 // default value to be overriden by user
71 public override int FieldCount {
72 get { throw new NotImplementedException (); }
76 public override bool HasRows {
77 get { throw new NotImplementedException (); }
81 public override bool IsClosed {
82 get { throw new NotImplementedException (); }
86 protected abstract bool IsValidRow { get; }
90 public override object this [[Optional] int index] {
91 get { throw new NotImplementedException (); }
95 public override object this [[Optional] string columnName] {
96 get { throw new NotImplementedException (); }
100 public override int RecordsAffected {
101 get { throw new NotImplementedException (); }
104 #endregion // Properties
109 protected void AssertReaderHasColumns ()
111 throw new NotImplementedException ();
115 protected void AssertReaderHasData ()
117 throw new NotImplementedException ();
121 protected void AssertReaderIsOpen (string methodName)
123 throw new NotImplementedException ();
127 public override void Close ()
129 throw new NotImplementedException ();
133 protected static DataTable CreateSchemaTable ()
135 throw new NotImplementedException ();
138 protected override void Dispose (bool disposing)
145 protected virtual void FillSchemaTable (DataTable dataTable)
147 throw new NotImplementedException ();
151 public override bool GetBoolean (int ordinal)
153 throw new NotImplementedException ();
157 public override byte GetByte (int ordinal)
159 throw new NotImplementedException ();
163 public override long GetBytes (int ordinal, long fieldoffset, byte[] buffer, int bufferoffset, int length)
165 throw new NotImplementedException ();
169 public override char GetChar (int ordinal)
171 throw new NotImplementedException ();
175 public override long GetChars (int ordinal, long fieldoffset, char[] buffer, int bufferoffset, int length)
177 throw new NotImplementedException ();
181 public override string GetDataTypeName (int ordinal)
183 throw new NotImplementedException ();
187 public override DateTime GetDateTime (int ordinal)
189 throw new NotImplementedException ();
193 public override decimal GetDecimal (int ordinal)
195 throw new NotImplementedException ();
199 public override double GetDouble (int ordinal)
201 throw new NotImplementedException ();
204 public override IEnumerator GetEnumerator ()
206 bool closeReader = (CommandBehavior & CommandBehavior.CloseConnection) != 0;
207 return new DbEnumerator (this , closeReader);
211 public override Type GetFieldType (int ordinal)
213 throw new NotImplementedException ();
217 public override float GetFloat (int ordinal)
219 throw new NotImplementedException ();
223 public override Guid GetGuid (int ordinal)
225 throw new NotImplementedException ();
229 public override short GetInt16 (int ordinal)
231 throw new NotImplementedException ();
235 public override int GetInt32 (int ordinal)
237 throw new NotImplementedException ();
241 public override long GetInt64 (int ordinal)
243 throw new NotImplementedException ();
247 public override string GetName (int ordinal)
249 throw new NotImplementedException ();
253 public override int GetOrdinal (string name)
255 throw new NotImplementedException ();
259 public override DataTable GetSchemaTable ()
261 throw new NotImplementedException ();
265 public override string GetString (int ordinal)
267 throw new NotImplementedException ();
271 public override object GetValue (int ordinal)
273 throw new NotImplementedException ();
277 public override int GetValues (object[] values)
279 throw new NotImplementedException ();
283 protected bool IsCommandBehavior (CommandBehavior condition)
285 throw new NotImplementedException ();
289 public override bool IsDBNull (int ordinal)
291 throw new NotImplementedException ();
295 public override bool NextResult ()
297 throw new NotImplementedException ();
301 public override bool Read ()
303 throw new NotImplementedException ();
306 #endregion // Methods