Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PgSqlParameter.cs « Mono.Data.PostgreSqlClient « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f79dad0dbfbe4ae1fe035090026a86edb05e4e4a (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
//
// System.Data.SqlClient.SqlParameter.cs
//
// Author:
//   Rodrigo Moya (rodrigo@ximian.com)
//   Daniel Morgan (danmorg@sc.rr.com)
//
// (C) Ximian, Inc. 2002
//
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Runtime.InteropServices;

namespace System.Data.SqlClient
{
	/// <summary>
	/// Represents a parameter to a Command object, and optionally, 
	/// its mapping to DataSet columns; and is implemented by .NET 
	/// data providers that access data sources.
	/// </summary>
	//public sealed class SqlParameter : MarshalByRefObject,
	//	IDbDataParameter, IDataParameter, ICloneable
	public sealed class SqlParameter : IDbDataParameter, IDataParameter
	{
		private string parmName;
		private SqlDbType dbtype;
		private DbType    theDbType;
		private object objValue;
		private int size;
		private string sourceColumn;
		private ParameterDirection direction;
		private bool isNullable;
		private byte precision;
		private byte scale;
		private DataRowVersion sourceVersion;
		private int offset;

		[MonoTODO]
		public SqlParameter () {
		
		}

		[MonoTODO]
		public SqlParameter (string parameterName, object value) {
			this.parmName = parameterName;
			this.objValue = value;
		}
		
		[MonoTODO]
		public SqlParameter(string parameterName, SqlDbType dbType) {
			this.parmName = parameterName;
			this.dbtype = dbType;
		}

		[MonoTODO]
		public SqlParameter(string parameterName, SqlDbType dbType,
			int size) {

			this.parmName = parameterName;
			this.dbtype = dbType;
			this.size = size;
		}
		
		[MonoTODO]
		public SqlParameter(string parameterName, SqlDbType dbType,
			int size, string sourceColumn) {

			this.parmName = parameterName;
			this.dbtype = dbType;
			this.size = size;
			this.sourceColumn = sourceColumn;
		}
			 
		[MonoTODO]
		public SqlParameter(string parameterName, SqlDbType dbType,
			int size, ParameterDirection direction, 
			bool isNullable, byte precision,
			byte scale, string sourceColumn,
			DataRowVersion sourceVersion, object value) {
			
			this.parmName = parameterName;
			this.dbtype = dbType;
			this.size = size;
			this.sourceColumn = sourceColumn;
			this.direction = direction;
			this.isNullable = isNullable;
			this.precision = precision;
			this.scale = scale;
			this.sourceVersion = sourceVersion;
			this.objValue = value;
		}

		[MonoTODO]
		public DbType DbType {
			get { 
				return theDbType;
			}
			set { 
				theDbType = value;
			}
		}

		[MonoTODO]
		public ParameterDirection Direction {
			get { 
				return direction;
			}
			set { 
				direction = value;
			}
		}

		[MonoTODO]
		public bool IsNullable	{
			get { 
				return isNullable;
			}
		}

		[MonoTODO]
		public int Offset {
			get {
				return offset;
			}
			
			set {
				offset = value;
			}
		}

		[MonoTODO]
		public string ParameterName {
			get { 
				return parmName;
			}

			set { 
				parmName = value;
			}
		}

		[MonoTODO]
		public string SourceColumn {
			get { 
				return sourceColumn;
			}

			set { 
				sourceColumn = value;
			}
		}

		[MonoTODO]
		public DataRowVersion SourceVersion {
			get { 
				return sourceVersion;
			}

			set { 
				sourceVersion = value;
			}
		}
		
		[MonoTODO]
		public SqlDbType SqlDbType {
			get {
				return dbtype;
			}
			
			set {
				dbtype = value;
			}
		}

		[MonoTODO]
		public object Value {
			get { 
				return objValue;
			}

			set { 
				objValue = value;
			}
		}

		[MonoTODO]
		public byte Precision {
			get { 
				return precision;
			}

			set { 
				precision = value;
			}
		}

		[MonoTODO]
                public byte Scale {
			get { 
				return scale;
			}

			set { 
				scale = value;
			}
		}

		[MonoTODO]
                public int Size
		{
			get { 
				return size;
			}

			set { 
				size = value;
			}
		}

		[MonoTODO]
		public override string ToString() {
			return parmName;
		}
	}
}