mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
* System.Data.Common/DbDataAdapter.cs: remove IDbCommands, except
for get accessors. These should be implemented in derived classes. See
SqlDataAdapter for clues.
* System.Data.SqlClient/SqlDataAdapter.cs: implement IDbDataAdapter
* System.Data.Common/DataAdapter.cs:
* System.Data.Common/DataTableMappingCollection.cs:
* System.Data.Common/DataTableMapping.cs:
* System.Data.Common/DataColumnMappingCollection.cs:
* System.Data.Common/DataColumnMapping.cs:
Properly (I hope!) implement all of the appropriate interfaces
for these classes.
svn path=/trunk/mcs/; revision=4908
114 lines
2.5 KiB
C#
114 lines
2.5 KiB
C#
//
|
|
// System.Data.Common.DataAdapter
|
|
//
|
|
// Author:
|
|
// Rodrigo Moya ([email protected])
|
|
// Tim Coleman ([email protected])
|
|
//
|
|
// (C) Ximian, Inc
|
|
// Copyright (C) 2002 Tim Coleman
|
|
//
|
|
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
|
|
namespace System.Data.Common
|
|
{
|
|
/// <summary>
|
|
/// Represents a set of data commands and a database connection that are used to fill the DataSet and update the data source.
|
|
/// </summary>
|
|
public abstract class DataAdapter : Component, IDataAdapter
|
|
{
|
|
#region Fields
|
|
|
|
private bool acceptChangesDuringFill;
|
|
private bool continueUpdateOnError;
|
|
private MissingMappingAction missingMappingAction;
|
|
private MissingSchemaAction missingSchemaAction;
|
|
private DataTableMappingCollection tableMappings;
|
|
|
|
#endregion
|
|
|
|
#region Constructors
|
|
|
|
protected DataAdapter ()
|
|
{
|
|
acceptChangesDuringFill = true;
|
|
continueUpdateOnError = false;
|
|
missingMappingAction = MissingMappingAction.Passthrough;
|
|
missingSchemaAction = MissingSchemaAction.Add;
|
|
tableMappings = new DataTableMappingCollection ();
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
public bool AcceptChangesDuringFill {
|
|
get { return acceptChangesDuringFill; }
|
|
set { acceptChangesDuringFill = value; }
|
|
}
|
|
|
|
public bool ContinueUpdateOnError {
|
|
get { return continueUpdateOnError; }
|
|
set { continueUpdateOnError = value; }
|
|
}
|
|
|
|
public MissingMappingAction MissingMappingAction {
|
|
get { return missingMappingAction; }
|
|
set { missingMappingAction = value; }
|
|
}
|
|
|
|
public MissingSchemaAction MissingSchemaAction {
|
|
get { return missingSchemaAction; }
|
|
set { missingSchemaAction = value; }
|
|
}
|
|
|
|
public DataTableMappingCollection TableMappings {
|
|
get { return tableMappings; }
|
|
}
|
|
|
|
ITableMappingCollection IDataAdapter.TableMappings {
|
|
get { return TableMappings; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Methods
|
|
|
|
|
|
[MonoTODO]
|
|
protected virtual DataAdapter CloneInternals ()
|
|
{
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
protected virtual DataTableMappingCollection CreateTableMappings ()
|
|
{
|
|
tableMappings = new DataTableMappingCollection ();
|
|
return tableMappings;
|
|
}
|
|
|
|
[MonoTODO]
|
|
protected override void Dispose (bool disposing)
|
|
{
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
public abstract int Fill (DataSet dataSet);
|
|
public abstract DataTable[] FillSchema (DataSet dataSet, SchemaType schemaType);
|
|
public abstract IDataParameter[] GetFillParameters ();
|
|
|
|
[MonoTODO]
|
|
protected virtual bool ShouldSerializeTableMappings ()
|
|
{
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
public abstract int Update (DataSet dataSet);
|
|
|
|
#endregion
|
|
|
|
}
|
|
}
|