| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- //namespace System.Data.Common
- //{
- //
- // //using clr.System;
- // //using clr.compiler.BitConstants;
- //
- // using System.Data;
- // using System.Data.ProviderBase;
- // using System.Text;
- //
- // /**
- // * @author erand
- // */
- // public abstract class AbstractDBParameter : DbParameterBase, System.ICloneable
- // {
- // /* Properties from IDataParameter */
- //// protected ParameterDirection _direction = ParameterDirection.Input;
- //// protected bool _isNullable = false;
- //// protected String _name = null;
- //// protected String _sourceColumn = null;
- // protected DataRowVersion _version = DataRowVersion.Current;
- //// protected Object _value = null;
- //
- // /* Properties from IDbDataParameter */
- //// protected byte _precision;
- //// protected byte _scale;
- //// protected int _size = -1;
- //
- // private int _place;
- // private int _jdbcType;
- //
- //// /**
- //// * @see System.Data.IDbDataParameter#Precision
- //// */
- //// public virtual byte Precision
- //// {
- //// get
- //// {
- //// return _precision;
- //// }
- //// set
- //// {
- //// _precision = value;
- //// }
- //// }
- //
- //
- //// /**
- //// * @see System.Data.IDbDataParameter#Scale
- //// */
- //// public virtual byte Scale
- //// {
- //// get
- //// {
- //// return _scale;
- //// }
- //// set
- //// {
- //// _scale = value;
- //// }
- //// }
- //
- //
- //
- //// /**
- //// * @see System.Data.IDbDataParameter#Size
- //// */
- //// public virtual int Size
- //// {
- //// get
- //// {
- //// return _size;
- //// }
- //// set
- //// {
- //// _size = value;
- //// }
- //// }
- //
- //
- //// /**
- //// * @see System.Data.IDataParameter#Direction
- //// */
- //// public virtual ParameterDirection Direction
- //// {
- //// get
- //// {
- //// return _direction;
- //// }
- //// set
- //// {
- //// _direction = value;
- //// }
- //// }
- //
- //
- //// /**
- //// * @see System.Data.IDataParameter#IsNullable
- //// */
- //// public virtual bool IsNullable
- //// {
- //// get
- //// {
- //// return _isNullable;
- //// }
- //// set
- //// {
- //// _isNullable = value;
- //// }
- //// }
- //
- //
- //// /**
- //// * @see System.Data.IDataParameter#ParameterName
- //// */
- //// public virtual String ParameterName
- //// {
- //// get
- //// {
- //// /**@todo What's the value of the Empty string ?*/
- //// /*Where to define our Empty String ?*/
- //// if (_name == null)
- //// return String.Empty;
- //// else
- //// return _name;
- //// }
- //// set
- //// {
- //// if ((value != null) && value.Equals(_name))
- //// return;
- //// //if ((value != null) && (value.length() > Constants.MAXIMAL_PARAMETER_LENGTH))
- //// /**@todo Implement Exception::-->*/
- //// // throw InvalidParameterLength(value);
- ////
- //// _name = value;
- //// }
- //// }
- //
- //
- //// /**
- //// * @see System.Data.IDataParameter#SourceColumn
- //// */
- //// public virtual String SourceColumn
- //// {
- //// get
- //// {
- //// if (_sourceColumn != null)
- //// return _sourceColumn;
- //// else
- //// return String.Empty;
- //// }
- //// set
- //// {
- //// _sourceColumn = value;
- //// }
- //// }
- //
- //
- //
- //// /**
- //// * @see System.Data.IDataParameter#SourceVersion
- //// */
- //// public virtual DataRowVersion SourceVersion
- //// {
- //// get
- //// {
- //// return _version;
- //// }
- //// set
- //// {
- //// _version = value;
- //// }
- //// }
- //
- //
- //// /**
- //// * @see System.Data.IDataParameter#Value
- //// */
- //// public virtual Object Value
- //// {
- //// get
- //// {
- //// return _value;
- //// }
- //// set
- //// {
- //// _value = value;
- //// }
- //// }
- //
- //
- //
- // public virtual void setParameterPlace(int place)
- // {
- // _place = place;
- // }
- //
- // public virtual int getParameterPlace()
- // {
- // return _place;
- // }
- //
- // abstract internal int getJDBCType(DbType dbType);
- //
- // internal int JdbcType
- // {
- // get {
- // return _jdbcType;
- // }
- //
- // set {
- // _jdbcType = value;
- // }
- // }
- //
- // public abstract DbType DbType
- // {
- // get;
- // set;
- // }
- //
- // public abstract Object Clone();
- //
- // internal virtual bool IsOracleRefCursor
- // {
- // get
- // {
- // return false;
- // }
- // }
- //
- // internal virtual String formatParameter()
- // {
- // if (Value == null || Value == DBNull.Value)
- // return "NULL";
- //
- // switch(DbType) {
- // case DbType.Byte:
- // case DbType.Currency:
- // case DbType.Decimal:
- // case DbType.Double:
- // case DbType.Int16:
- // case DbType.Int32:
- // case DbType.Int64:
- // case DbType.SByte:
- // case DbType.Single:
- // case DbType.UInt16:
- // case DbType.UInt32:
- // case DbType.UInt64:
- // return Value.ToString();
- // case DbType.Boolean:
- // return (bool)Value ? "0x1" : "0x0";
- // case DbType.Binary:
- // default:
- // return String.Concat("\'", Value.ToString().Replace("\'", "\'\'"),"\'");
- // }
- // }
- // }
- //}
|