SqlBulkCopy.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. //
  2. // System.Data.SqlClient.SqlBulkCopy.cs
  3. //
  4. // Author:
  5. // Nagappan A ([email protected])
  6. //
  7. // (C) Novell, Inc 2007
  8. //
  9. // Copyright (C) 2007 Novell, Inc (http://www.novell.com)
  10. //
  11. // Permission is hereby granted, free of charge, to any person obtaining
  12. // a copy of this software and associated documentation files (the
  13. // "Software"), to deal in the Software without restriction, including
  14. // without limitation the rights to use, copy, modify, merge, publish,
  15. // distribute, sublicense, and/or sell copies of the Software, and to
  16. // permit persons to whom the Software is furnished to do so, subject to
  17. // the following conditions:
  18. //
  19. // The above copyright notice and this permission notice shall be
  20. // included in all copies or substantial portions of the Software.
  21. //
  22. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  23. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  24. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  25. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  26. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  27. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  28. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  29. //
  30. #if NET_2_0
  31. using System;
  32. using System.Data;
  33. using System.Data.Common;
  34. namespace System.Data.SqlClient {
  35. public sealed class SqlBulkCopy : IDisposable
  36. {
  37. #region Fields
  38. private int _batchSize = 0;
  39. private int _bulkCopyTimeout = 0;
  40. private SqlBulkCopyColumnMappingCollection _columnMappingCollection = new SqlBulkCopyColumnMappingCollection ();
  41. private string _destinationTableName = null;
  42. #endregion
  43. #region Constructors
  44. [MonoTODO]
  45. public SqlBulkCopy (SqlConnection connection)
  46. {
  47. throw new NotImplementedException ();
  48. }
  49. [MonoTODO]
  50. public SqlBulkCopy (string connectionString)
  51. {
  52. throw new NotImplementedException ();
  53. }
  54. [MonoTODO]
  55. public SqlBulkCopy (string connectionString, SqlBulkCopyOptions copyOptions)
  56. {
  57. throw new NotImplementedException ();
  58. }
  59. [MonoTODO]
  60. public SqlBulkCopy (SqlConnection connection, SqlBulkCopyOptions copyOptions, SqlTransaction externalTransaction)
  61. {
  62. throw new NotImplementedException ();
  63. }
  64. #endregion
  65. #region Properties
  66. public int BatchSize {
  67. get { return _batchSize; }
  68. set { _batchSize = value; }
  69. }
  70. public int BulkCopyTimeout {
  71. get { return _bulkCopyTimeout; }
  72. set { _bulkCopyTimeout = value; }
  73. }
  74. public SqlBulkCopyColumnMappingCollection ColumnMappings {
  75. get { return _columnMappingCollection; }
  76. }
  77. [MonoTODO]
  78. public string DestinationTableName {
  79. // FIXME: Related to WriteToServer
  80. get { return _destinationTableName; }
  81. set { _destinationTableName = value; }
  82. }
  83. #endregion
  84. #region Methods
  85. [MonoTODO]
  86. public void Close ()
  87. {
  88. throw new NotImplementedException ();
  89. }
  90. [MonoTODO]
  91. public void WriteToServer (DataRow [] rows)
  92. {
  93. throw new NotImplementedException ();
  94. }
  95. [MonoTODO]
  96. public void WriteToServer (DataTable table)
  97. {
  98. throw new NotImplementedException ();
  99. }
  100. [MonoTODO]
  101. public void WriteToServer (IDataReader reader)
  102. {
  103. throw new NotImplementedException ();
  104. }
  105. [MonoTODO]
  106. public void WriteToServer (DataTable table, DataRowState rowState)
  107. {
  108. throw new NotImplementedException ();
  109. }
  110. #endregion
  111. [MonoTODO]
  112. void IDisposable.Dispose ()
  113. {
  114. throw new NotImplementedException ();
  115. }
  116. }
  117. }
  118. #endif