SqlMetaData.cs 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. //
  2. // System.Data.Sql.SqlMetaData
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2003
  8. //
  9. #if NET_1_2
  10. using System;
  11. using System.Data.SqlTypes;
  12. namespace System.Data.Sql {
  13. public sealed class SqlMetaData
  14. {
  15. #region Fields
  16. public const long x_lMax = -1;
  17. SqlCompareOptions compareOptions = SqlCompareOptions.None;
  18. string databaseName = null;
  19. bool isPartialLength = false;
  20. long localeId = 0L;
  21. long maxLength = 4L;
  22. string name;
  23. byte precision = 10;
  24. byte scale = 0;
  25. string schemaName = null;
  26. SqlDbType sqlDbType = SqlDbType.Int;
  27. #endregion // Fields
  28. #region Constructors
  29. [MonoTODO]
  30. public SqlMetaData (string name, SqlDbType type)
  31. {
  32. this.name = name;
  33. this.sqlDbType = type;
  34. }
  35. [MonoTODO]
  36. public SqlMetaData (string name, SqlDbType type, long maxLength)
  37. {
  38. this.maxLength = maxLength;
  39. this.name = name;
  40. this.sqlDbType = type;
  41. }
  42. [MonoTODO]
  43. public SqlMetaData (string name, SqlDbType type, SqlMetaData[] columnMetaData)
  44. {
  45. this.sqlDbType = type;
  46. }
  47. [MonoTODO]
  48. public SqlMetaData (string name, SqlDbType type, byte precision, byte scale)
  49. {
  50. this.name = name;
  51. this.precision = precision;
  52. this.scale = scale;
  53. this.sqlDbType = type;
  54. }
  55. [MonoTODO]
  56. public SqlMetaData (string strName, long maxLength, long localeId, SqlCompareOptions compareOptions, string udtTypeName)
  57. {
  58. this.compareOptions = compareOptions;
  59. this.localeId = localeId;
  60. this.maxLength = maxLength;
  61. this.name = strName;
  62. }
  63. [MonoTODO]
  64. public SqlMetaData (string name, SqlDbType type, long maxLength, long locale, SqlCompareOptions compareOptions)
  65. {
  66. this.compareOptions = compareOptions;
  67. this.localeId = locale;
  68. this.maxLength = maxLength;
  69. this.name = name;
  70. this.sqlDbType = type;
  71. }
  72. [MonoTODO]
  73. public SqlMetaData (string name, SqlDbType type, long maxLength, byte precision, byte scale, long localeId, SqlCompareOptions compareOptions, string DatabaseName, string SchemaName, bool PartialLength, string udtTypeName)
  74. {
  75. this.compareOptions = compareOptions;
  76. this.databaseName = DatabaseName;
  77. this.isPartialLength = PartialLength;
  78. this.localeId = localeId;
  79. this.maxLength = maxLength;
  80. this.name = name;
  81. this.precision = precision;
  82. this.scale = scale;
  83. this.schemaName = SchemaName;
  84. this.sqlDbType = type;
  85. }
  86. #endregion // Constructors
  87. #region Properties
  88. public SqlCompareOptions CompareOptions {
  89. get { return compareOptions; }
  90. }
  91. public string DatabaseName {
  92. get { return databaseName; }
  93. }
  94. [MonoTODO]
  95. public DbType DbType {
  96. get { throw new NotImplementedException (); }
  97. }
  98. public bool IsPartialLength {
  99. get { return isPartialLength; }
  100. }
  101. public long LocaleId {
  102. get { return localeId; }
  103. }
  104. public static long MAX {
  105. get { return x_lMax; }
  106. }
  107. public long MaxLength {
  108. get { return maxLength; }
  109. }
  110. public string Name {
  111. get { return name; }
  112. }
  113. public byte Precision {
  114. get { return precision; }
  115. }
  116. public byte Scale {
  117. get { return scale; }
  118. }
  119. public string SchemaName {
  120. get { return schemaName; }
  121. }
  122. public SqlDbType SqlDbType {
  123. get { return sqlDbType; }
  124. }
  125. [MonoTODO]
  126. public string TypeName {
  127. get { throw new NotImplementedException (); }
  128. }
  129. #endregion // Properties
  130. #region Methods
  131. [MonoTODO]
  132. public bool Adjust (bool value)
  133. {
  134. throw new NotImplementedException ();
  135. }
  136. [MonoTODO]
  137. public byte Adjust (byte value)
  138. {
  139. throw new NotImplementedException ();
  140. }
  141. [MonoTODO]
  142. public byte[] Adjust (byte[] value)
  143. {
  144. throw new NotImplementedException ();
  145. }
  146. [MonoTODO]
  147. public char Adjust (char value)
  148. {
  149. throw new NotImplementedException ();
  150. }
  151. [MonoTODO]
  152. public char[] Adjust (char[] value)
  153. {
  154. throw new NotImplementedException ();
  155. }
  156. [MonoTODO]
  157. public DateTime Adjust (DateTime value)
  158. {
  159. throw new NotImplementedException ();
  160. }
  161. [MonoTODO]
  162. public decimal Adjust (decimal value)
  163. {
  164. throw new NotImplementedException ();
  165. }
  166. [MonoTODO]
  167. public double Adjust (double value)
  168. {
  169. throw new NotImplementedException ();
  170. }
  171. [MonoTODO]
  172. public Guid Adjust (Guid value)
  173. {
  174. throw new NotImplementedException ();
  175. }
  176. [MonoTODO]
  177. public short Adjust (short value)
  178. {
  179. throw new NotImplementedException ();
  180. }
  181. [MonoTODO]
  182. public int Adjust (int value)
  183. {
  184. throw new NotImplementedException ();
  185. }
  186. [MonoTODO]
  187. public long Adjust (long value)
  188. {
  189. throw new NotImplementedException ();
  190. }
  191. [MonoTODO]
  192. public object Adjust (object value)
  193. {
  194. throw new NotImplementedException ();
  195. }
  196. [MonoTODO]
  197. public float Adjust (float value)
  198. {
  199. throw new NotImplementedException ();
  200. }
  201. [MonoTODO]
  202. public SqlBinary Adjust (SqlBinary value)
  203. {
  204. throw new NotImplementedException ();
  205. }
  206. [MonoTODO]
  207. public SqlBoolean Adjust (SqlBoolean value)
  208. {
  209. throw new NotImplementedException ();
  210. }
  211. [MonoTODO]
  212. public SqlByte Adjust (SqlByte value)
  213. {
  214. throw new NotImplementedException ();
  215. }
  216. [MonoTODO]
  217. public SqlBytes Adjust (SqlBytes value)
  218. {
  219. throw new NotImplementedException ();
  220. }
  221. [MonoTODO]
  222. public SqlChars Adjust (SqlChars value)
  223. {
  224. throw new NotImplementedException ();
  225. }
  226. [MonoTODO]
  227. public SqlDateTime Adjust (SqlDateTime value)
  228. {
  229. throw new NotImplementedException ();
  230. }
  231. [MonoTODO]
  232. public SqlDecimal Adjust (SqlDecimal value)
  233. {
  234. throw new NotImplementedException ();
  235. }
  236. [MonoTODO]
  237. public SqlDouble Adjust (SqlDouble value)
  238. {
  239. throw new NotImplementedException ();
  240. }
  241. [MonoTODO]
  242. public SqlGuid Adjust (SqlGuid value)
  243. {
  244. throw new NotImplementedException ();
  245. }
  246. [MonoTODO]
  247. public SqlInt16 Adjust (SqlInt16 value)
  248. {
  249. throw new NotImplementedException ();
  250. }
  251. [MonoTODO]
  252. public SqlInt32 Adjust (SqlInt32 value)
  253. {
  254. throw new NotImplementedException ();
  255. }
  256. [MonoTODO]
  257. public SqlInt64 Adjust (SqlInt64 value)
  258. {
  259. throw new NotImplementedException ();
  260. }
  261. [MonoTODO]
  262. public SqlMoney Adjust (SqlMoney value)
  263. {
  264. throw new NotImplementedException ();
  265. }
  266. [MonoTODO]
  267. public SqlSingle Adjust (SqlSingle value)
  268. {
  269. throw new NotImplementedException ();
  270. }
  271. [MonoTODO]
  272. public SqlString Adjust (SqlString value)
  273. {
  274. throw new NotImplementedException ();
  275. }
  276. [MonoTODO]
  277. public string Adjust (string value)
  278. {
  279. throw new NotImplementedException ();
  280. }
  281. [MonoTODO]
  282. public SqlMetaData GetMetaData (int i)
  283. {
  284. throw new NotImplementedException ();
  285. }
  286. [MonoTODO]
  287. public static SqlMetaData InferFromValue (object value, string name)
  288. {
  289. throw new NotImplementedException ();
  290. }
  291. #endregion // Methods
  292. }
  293. }
  294. #endif