blob: 2ec749be1c0beaaf85e8176743d92e8d3332a4a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
//
// System.Data.Common.DataAdapter
//
// Author:
// Rodrigo Moya (rodrigo@ximian.com)
// Tim Coleman (tim@timcoleman.com)
//
// (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
}
}
|