AbstractDBParameter.cs 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. //namespace System.Data.Common
  2. //{
  3. //
  4. // //using clr.System;
  5. // //using clr.compiler.BitConstants;
  6. //
  7. // using System.Data;
  8. // using System.Data.ProviderBase;
  9. // using System.Text;
  10. //
  11. // /**
  12. // * @author erand
  13. // */
  14. // public abstract class AbstractDBParameter : DbParameterBase, System.ICloneable
  15. // {
  16. // /* Properties from IDataParameter */
  17. //// protected ParameterDirection _direction = ParameterDirection.Input;
  18. //// protected bool _isNullable = false;
  19. //// protected String _name = null;
  20. //// protected String _sourceColumn = null;
  21. // protected DataRowVersion _version = DataRowVersion.Current;
  22. //// protected Object _value = null;
  23. //
  24. // /* Properties from IDbDataParameter */
  25. //// protected byte _precision;
  26. //// protected byte _scale;
  27. //// protected int _size = -1;
  28. //
  29. // private int _place;
  30. // private int _jdbcType;
  31. //
  32. //// /**
  33. //// * @see System.Data.IDbDataParameter#Precision
  34. //// */
  35. //// public virtual byte Precision
  36. //// {
  37. //// get
  38. //// {
  39. //// return _precision;
  40. //// }
  41. //// set
  42. //// {
  43. //// _precision = value;
  44. //// }
  45. //// }
  46. //
  47. //
  48. //// /**
  49. //// * @see System.Data.IDbDataParameter#Scale
  50. //// */
  51. //// public virtual byte Scale
  52. //// {
  53. //// get
  54. //// {
  55. //// return _scale;
  56. //// }
  57. //// set
  58. //// {
  59. //// _scale = value;
  60. //// }
  61. //// }
  62. //
  63. //
  64. //
  65. //// /**
  66. //// * @see System.Data.IDbDataParameter#Size
  67. //// */
  68. //// public virtual int Size
  69. //// {
  70. //// get
  71. //// {
  72. //// return _size;
  73. //// }
  74. //// set
  75. //// {
  76. //// _size = value;
  77. //// }
  78. //// }
  79. //
  80. //
  81. //// /**
  82. //// * @see System.Data.IDataParameter#Direction
  83. //// */
  84. //// public virtual ParameterDirection Direction
  85. //// {
  86. //// get
  87. //// {
  88. //// return _direction;
  89. //// }
  90. //// set
  91. //// {
  92. //// _direction = value;
  93. //// }
  94. //// }
  95. //
  96. //
  97. //// /**
  98. //// * @see System.Data.IDataParameter#IsNullable
  99. //// */
  100. //// public virtual bool IsNullable
  101. //// {
  102. //// get
  103. //// {
  104. //// return _isNullable;
  105. //// }
  106. //// set
  107. //// {
  108. //// _isNullable = value;
  109. //// }
  110. //// }
  111. //
  112. //
  113. //// /**
  114. //// * @see System.Data.IDataParameter#ParameterName
  115. //// */
  116. //// public virtual String ParameterName
  117. //// {
  118. //// get
  119. //// {
  120. //// /**@todo What's the value of the Empty string ?*/
  121. //// /*Where to define our Empty String ?*/
  122. //// if (_name == null)
  123. //// return String.Empty;
  124. //// else
  125. //// return _name;
  126. //// }
  127. //// set
  128. //// {
  129. //// if ((value != null) && value.Equals(_name))
  130. //// return;
  131. //// //if ((value != null) && (value.length() > Constants.MAXIMAL_PARAMETER_LENGTH))
  132. //// /**@todo Implement Exception::-->*/
  133. //// // throw InvalidParameterLength(value);
  134. ////
  135. //// _name = value;
  136. //// }
  137. //// }
  138. //
  139. //
  140. //// /**
  141. //// * @see System.Data.IDataParameter#SourceColumn
  142. //// */
  143. //// public virtual String SourceColumn
  144. //// {
  145. //// get
  146. //// {
  147. //// if (_sourceColumn != null)
  148. //// return _sourceColumn;
  149. //// else
  150. //// return String.Empty;
  151. //// }
  152. //// set
  153. //// {
  154. //// _sourceColumn = value;
  155. //// }
  156. //// }
  157. //
  158. //
  159. //
  160. //// /**
  161. //// * @see System.Data.IDataParameter#SourceVersion
  162. //// */
  163. //// public virtual DataRowVersion SourceVersion
  164. //// {
  165. //// get
  166. //// {
  167. //// return _version;
  168. //// }
  169. //// set
  170. //// {
  171. //// _version = value;
  172. //// }
  173. //// }
  174. //
  175. //
  176. //// /**
  177. //// * @see System.Data.IDataParameter#Value
  178. //// */
  179. //// public virtual Object Value
  180. //// {
  181. //// get
  182. //// {
  183. //// return _value;
  184. //// }
  185. //// set
  186. //// {
  187. //// _value = value;
  188. //// }
  189. //// }
  190. //
  191. //
  192. //
  193. // public virtual void setParameterPlace(int place)
  194. // {
  195. // _place = place;
  196. // }
  197. //
  198. // public virtual int getParameterPlace()
  199. // {
  200. // return _place;
  201. // }
  202. //
  203. // abstract internal int getJDBCType(DbType dbType);
  204. //
  205. // internal int JdbcType
  206. // {
  207. // get {
  208. // return _jdbcType;
  209. // }
  210. //
  211. // set {
  212. // _jdbcType = value;
  213. // }
  214. // }
  215. //
  216. // public abstract DbType DbType
  217. // {
  218. // get;
  219. // set;
  220. // }
  221. //
  222. // public abstract Object Clone();
  223. //
  224. // internal virtual bool IsOracleRefCursor
  225. // {
  226. // get
  227. // {
  228. // return false;
  229. // }
  230. // }
  231. //
  232. // internal virtual String formatParameter()
  233. // {
  234. // if (Value == null || Value == DBNull.Value)
  235. // return "NULL";
  236. //
  237. // switch(DbType) {
  238. // case DbType.Byte:
  239. // case DbType.Currency:
  240. // case DbType.Decimal:
  241. // case DbType.Double:
  242. // case DbType.Int16:
  243. // case DbType.Int32:
  244. // case DbType.Int64:
  245. // case DbType.SByte:
  246. // case DbType.Single:
  247. // case DbType.UInt16:
  248. // case DbType.UInt32:
  249. // case DbType.UInt64:
  250. // return Value.ToString();
  251. // case DbType.Boolean:
  252. // return (bool)Value ? "0x1" : "0x0";
  253. // case DbType.Binary:
  254. // default:
  255. // return String.Concat("\'", Value.ToString().Replace("\'", "\'\'"),"\'");
  256. // }
  257. // }
  258. // }
  259. //}