2
0

DbMetaDataFactory.cs 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. //
  2. // System.Data.ProviderBase.DbMetaDataFactory
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2003
  8. //
  9. //
  10. // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
  11. //
  12. // Permission is hereby granted, free of charge, to any person obtaining
  13. // a copy of this software and associated documentation files (the
  14. // "Software"), to deal in the Software without restriction, including
  15. // without limitation the rights to use, copy, modify, merge, publish,
  16. // distribute, sublicense, and/or sell copies of the Software, and to
  17. // permit persons to whom the Software is furnished to do so, subject to
  18. // the following conditions:
  19. //
  20. // The above copyright notice and this permission notice shall be
  21. // included in all copies or substantial portions of the Software.
  22. //
  23. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  24. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  25. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  26. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  27. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  28. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  29. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  30. //
  31. #if NET_2_0
  32. using System.Data.Common;
  33. using System.IO;
  34. namespace System.Data.ProviderBase {
  35. public class DbMetaDataFactory
  36. {
  37. #region Fields
  38. Stream xmlStream;
  39. string serverVersion;
  40. string serverVersionNormalized;
  41. #endregion // Fields
  42. #region Constructors
  43. [MonoTODO]
  44. public DbMetaDataFactory (Stream XmlStream, string serverVersion, string serverVersionNormalized)
  45. {
  46. this.xmlStream = XmlStream;
  47. this.serverVersion = serverVersion;
  48. this.serverVersionNormalized = serverVersionNormalized;
  49. }
  50. #endregion // Constructors
  51. #region Properties
  52. [MonoTODO]
  53. protected DataSet CollectionDataSet {
  54. get { throw new NotImplementedException (); }
  55. }
  56. protected string ServerVersion {
  57. get { return serverVersion; }
  58. }
  59. protected string ServerVersionNormalized {
  60. get { return serverVersionNormalized; }
  61. }
  62. #endregion // Properties
  63. #region Methods
  64. [MonoTODO]
  65. protected DataTable CloneAndFilterCollection (string collectionName, string[] hiddenColumnNames)
  66. {
  67. throw new NotImplementedException ();
  68. }
  69. [MonoTODO]
  70. public void Dispose ()
  71. {
  72. throw new NotImplementedException ();
  73. }
  74. [MonoTODO]
  75. protected virtual void Dispose (bool disposing)
  76. {
  77. throw new NotImplementedException ();
  78. }
  79. [MonoTODO]
  80. public virtual DataTable GetSchema (DbConnection connection, DbConnectionInternal internalConnection, string collectionName, string[] restrictions)
  81. {
  82. throw new NotImplementedException ();
  83. }
  84. [MonoTODO]
  85. public virtual DataTable PrepareCollection (string collectionName, string[] restrictions, DbConnection connection, DbConnectionInternal internalConnection)
  86. {
  87. throw new NotImplementedException ();
  88. }
  89. #endregion // Methods
  90. public class CollectionNames
  91. {
  92. #region Fields
  93. public const string DataSourceInformation = "DataSourceInformation";
  94. public const string DataTypes = "DataTypes";
  95. public const string MetaDataCollections = "MetaDataCollections";
  96. public const string ReservedWords = "ReservedWords";
  97. public const string Restrictions = "Restrictions";
  98. #endregion // Fields
  99. #region Constructors
  100. [MonoTODO]
  101. protected CollectionNames ()
  102. {
  103. }
  104. #endregion // Constructors
  105. }
  106. public class ColumnNames
  107. {
  108. #region Fields
  109. public const string CollectionName = "CollectionName";
  110. public const string ColumnSize = "ColumnSize";
  111. public const string CompositeIdentifierSeparatorPattern = "CompositeIdentifierSeparatorPattern";
  112. public const string CreateFormat = "CreateFormat";
  113. public const string CreateParameters = "CreateParameters";
  114. public const string DataSourceProductName = "DataSourceProductName";
  115. public const string DataSourceProductVersion = "DataSourceProductVersion";
  116. public const string DataSourceProductVersionNormalized = "DataSourceProductVersionNormalized";
  117. public const string DataType = "DataType";
  118. public const string GroupByBehavior = "GroupByBehavior";
  119. public const string IdentifierCase = "IdentifierCase";
  120. public const string IdentifierPattern = "IdentifierPattern";
  121. public const string IsAutoIncrementable = "IsAutoIncrementable";
  122. public const string IsBestMatch = "IsBestMatch";
  123. public const string IsCaseSensitive = "IsCaseSensitive";
  124. public const string IsFixedLength = "IsFixedLength";
  125. public const string IsFixedPrecisionScale = "IsFixedPrecisionScale";
  126. public const string IsLiteralSupported = "IsLiteralSupported";
  127. public const string IsLong = "IsLong";
  128. public const string IsNullable = "IsNullable";
  129. public const string IsSearchable = "IsSearchable";
  130. public const string IsSearchableWithLike = "IsSearchableWithLike";
  131. public const string IsUnsigned = "IsUnsigned";
  132. public const string LiteralPrefix = "LiteralPrefix";
  133. public const string LiteralSuffix = "LiteralSuffix";
  134. public const string MaximumScale = "MaximumScale";
  135. public const string MinimumScale = "MinimumScale";
  136. public const string NumberOfIdentifierParts = "NumberOfIdentifierParts";
  137. public const string NumberOfRestrictions = "NumberOfRestrictions";
  138. public const string OrderByColumnsInSelect = "OrderByColumnsInSelect";
  139. public const string ParameterMarkerFormat = "ParameterMarkerFormat";
  140. public const string ParameterMarkerPattern = "ParameterMarkerPattern";
  141. public const string ParameterNameMaxLength = "ParameterNameMaxLength";
  142. public const string ProviderDbType = "ProviderDbType";
  143. public const string QuotedIdentifierCase = "QuotedIdentifierCase";
  144. public const string QuotedIdentifierPattern = "QuotedIdentifierPattern";
  145. public const string ReservedWord = "ReservedWord";
  146. public const string SQLJoinSupport = "SQLJoinSupport";
  147. public const string StatementSeparatorPattern = "StatementSeparatorPattern";
  148. public const string StringLiteralPattern = "StringLiteralPattern";
  149. public const string TypeName = "TypeName";
  150. #endregion // Fields
  151. #region Constructors
  152. [MonoTODO]
  153. public ColumnNames ()
  154. {
  155. }
  156. #endregion // Constructors
  157. }
  158. }
  159. }
  160. #endif