2 // System.Data.Common.DbCommandBuilder
5 // Tim Coleman (tim@timcoleman.com)
7 // Copyright (C) Tim Coleman, 2003
11 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
13 // Permission is hereby granted, free of charge, to any person obtaining
14 // a copy of this software and associated documentation files (the
15 // "Software"), to deal in the Software without restriction, including
16 // without limitation the rights to use, copy, modify, merge, publish,
17 // distribute, sublicense, and/or sell copies of the Software, and to
18 // permit persons to whom the Software is furnished to do so, subject to
19 // the following conditions:
21 // The above copyright notice and this permission notice shall be
22 // included in all copies or substantial portions of the Software.
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 #if NET_2_0 || TARGET_JVM
35 using System.ComponentModel;
38 namespace System.Data.Common {
39 public abstract class DbCommandBuilder : Component
41 bool _setAllValues = false;
46 protected DbCommandBuilder ()
50 #endregion // Constructors
55 [DefaultValue (CatalogLocation.Start)]
56 public virtual CatalogLocation CatalogLocation {
57 get { throw new NotImplementedException (); }
58 set { throw new NotImplementedException (); }
63 public virtual string CatalogSeparator {
64 get { throw new NotImplementedException (); }
65 set { throw new NotImplementedException (); }
69 [DefaultValue (ConflictOption.CompareAllSearchableValues)]
70 public virtual ConflictOption ConflictOption {
71 get { throw new NotImplementedException (); }
72 set { throw new NotImplementedException (); }
76 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
78 public DbDataAdapter DataAdapter {
79 get { throw new NotImplementedException (); }
80 set { throw new NotImplementedException (); }
85 public virtual string QuotePrefix {
86 get { throw new NotImplementedException (); }
87 set { throw new NotImplementedException (); }
92 public virtual string QuoteSuffix {
93 get { throw new NotImplementedException (); }
94 set { throw new NotImplementedException (); }
99 public virtual string SchemaSeparator {
100 get { throw new NotImplementedException (); }
101 set { throw new NotImplementedException (); }
104 [DefaultValue (false)]
105 public bool SetAllValues {
106 get { return _setAllValues; }
107 set { _setAllValues = value; }
110 #endregion // Properties
114 protected abstract void ApplyParameterInfo (DbParameter parameter,
116 StatementType statementType,
120 protected override void Dispose (bool disposing)
122 throw new NotImplementedException ();
126 public DbCommand GetDeleteCommand ()
128 throw new NotImplementedException ();
132 public DbCommand GetDeleteCommand (bool option)
134 throw new NotImplementedException ();
138 public DbCommand GetInsertCommand ()
140 throw new NotImplementedException ();
144 public DbCommand GetInsertCommand (bool option)
146 throw new NotImplementedException ();
149 protected abstract string GetParameterName (int parameterOrdinal);
150 protected abstract string GetParameterName (String parameterName);
151 protected abstract string GetParameterPlaceholder (int parameterOrdinal);
154 public DbCommand GetUpdateCommand ()
156 throw new NotImplementedException ();
160 public DbCommand GetUpdateCommand (bool option)
162 throw new NotImplementedException ();
166 protected virtual DbCommand InitializeCommand (DbCommand command)
168 throw new NotImplementedException ();
172 public virtual string QuoteIdentifier (string unquotedIdentifier)
174 throw new NotImplementedException ();
178 public virtual void RefreshSchema ()
180 throw new NotImplementedException ();
184 protected void RowUpdatingHandler (RowUpdatingEventArgs rowUpdatingEvent)
186 throw new NotImplementedException ();
189 protected abstract void SetRowUpdatingHandler (DbDataAdapter adapter);
192 public virtual string UnquoteIdentifier (string quotedIdentifier)
194 throw new NotImplementedException ();
197 protected virtual DataTable GetSchemaTable (DbCommand cmd)
199 using (DbDataReader rdr = cmd.ExecuteReader ())
200 return rdr.GetSchemaTable ();
203 #endregion // Methods