+2004-06-19 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * Makefile: added references to System.EnterpriseServices and
+ System.Drawing assemblies
+ * System.Data.OracleClient.dll: added Assembly/Consts.cs and
+ System.Data.OracleClient/OracleMonthSpan.cs
+ * OracleCommand.cs: added missing attributes, marked class sealed,
+ fixed signature of ExecuteOracleScalar method
+ * OracleCommandBuilder.cs: added missing attributes
+ * OracleConnection.cs: marked class sealed, added missing attributes,
+ stubbed missing propertie, methods and events
+ * OracleDataAdapter.cs: added missing attributes, removed extra
+ stubbed Dispose method
+ * OracleDataReader.cs: stubbed missing methods
+ * OracleDataTime.cs: fixed signature and implementation of operator
+ * OracleException.cs: marked serializable, added serialization ctor
+ * OracleParameter.cs: added missing attributes, marked extra methods
+ private
+ * OracleParameterCollection.cs: marked class sealed, added missing
+ attributes
+ * OracleString.cs: added missing methods, added missing operators
+
2004-05-27 Joerg Rosenkranz <joergr@voelcker.com>
* System.Data.OracleClient/OracleCommandBuilder.cs:
LIBRARY = System.Data.OracleClient.dll
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll \
/r:System.Xml.dll /r:System.Data.dll \
+ /r:System.EnterpriseServices.dll \
+ /r:System.Drawing.dll \
/nowarn:649 /nowarn:169
NO_TEST = yes
EXTRA_DISTFILES = Test/TestOracleClient.cs
Assembly/AssemblyInfo.cs
Assembly/Locale.cs
+Assembly/Consts.cs
System.Data.OracleClient.Oci/OciAttributeType.cs
System.Data.OracleClient.Oci/OciBindHandle.cs
System.Data.OracleClient.Oci/OciCalls.cs
System.Data.OracleClient/OracleInfoMessageEventHandler.cs
System.Data.OracleClient/OracleLob.cs
System.Data.OracleClient/OracleLobOpenMode.cs
+System.Data.OracleClient/OracleMonthSpan.cs
System.Data.OracleClient/OracleNumber.cs
System.Data.OracleClient/OracleParameterCollection.cs
System.Data.OracleClient/OracleParameter.cs
using System.ComponentModel;
using System.Data;
using System.Data.OracleClient.Oci;
+using System.Drawing.Design;
namespace System.Data.OracleClient {
- public class OracleCommand : Component, ICloneable, IDbCommand
+ [Designer ("Microsoft.VSDesigner.Data.VS.OracleCommandDesigner, " + Consts.AssemblyMicrosoft_VSDesigner)]
+ [ToolboxItem (true)]
+ public sealed class OracleCommand : Component, ICloneable, IDbCommand
{
#region Fields
UpdatedRowSource = UpdateRowSource.Both;
DesignTimeVisible = false;
- parameters = new OracleParameterCollection (this);
+ parameters = new OracleParameterCollection (this);
}
#endregion // Constructors
#region Properties
+ [DefaultValue ("")]
+ [RefreshProperties (RefreshProperties.All)]
+ [Editor ("Microsoft.VSDesigner.Data.Oracle.Design.OracleCommandTextEditor, " + Consts.AssemblyMicrosoft_VSDesigner, typeof(UITypeEditor))]
public string CommandText {
get { return commandText; }
set { commandText = value; }
}
+ [RefreshProperties (RefreshProperties.All)]
+ [DefaultValue (CommandType.Text)]
public CommandType CommandType {
get { return commandType; }
set { commandType = value; }
}
+ [DefaultValue (null)]
+ [Editor ("Microsoft.VSDesigner.Data.Design.DbConnectionEditor, " + Consts.AssemblyMicrosoft_VSDesigner, typeof(UITypeEditor))]
public OracleConnection Connection {
get { return connection; }
set { connection = value; }
}
+ [DefaultValue (true)]
+ [Browsable (false)]
+ [DesignOnly (true)]
public bool DesignTimeVisible {
get { return designTimeVisible; }
set { designTimeVisible = value; }
set { }
}
+ [Editor ("Microsoft.VSDesigner.Data.Design.DbConnectionEditor, " + Consts.AssemblyMicrosoft_VSDesigner, typeof(UITypeEditor))]
+ [DefaultValue (null)]
IDbConnection IDbCommand.Connection {
get { return Connection; }
set {
}
}
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public OracleParameterCollection Parameters {
get { return parameters; }
}
+ [Browsable (false)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public OracleTransaction Transaction {
get { return transaction; }
set { transaction = value; }
}
+ [DefaultValue (UpdateRowSource.Both)]
public UpdateRowSource UpdatedRowSource {
get { return updatedRowSource; }
set { updatedRowSource = value; }
}
[MonoTODO]
- public object ExecuteOracleScalar (out OracleString rowid)
+ public object ExecuteOracleScalar ()
{
throw new NotImplementedException ();
}
#region Properties
- [DataSysDescriptionAttribute ("The DataAdapter for which to automatically generate OracleCommands")]
[DefaultValue (null)]
public OracleDataAdapter DataAdapter {
get {
}
[BrowsableAttribute (false)]
- [DataSysDescriptionAttribute ("The prefix string wrapped around sql objects")]
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
public string QuotePrefix {
get {
}
[BrowsableAttribute (false)]
- [DataSysDescriptionAttribute ("The suffix string wrapped around sql objects")]
- [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
+ [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
public string QuoteSuffix {
get {
return quoteSuffix;
using System.ComponentModel;
using System.Data;
using System.Data.OracleClient.Oci;
+using System.Drawing.Design;
+using System.EnterpriseServices;
using System.Text;
namespace System.Data.OracleClient
public string Database;
}
- public class OracleConnection : Component, ICloneable, IDbConnection
+ [DefaultEvent ("InfoMessage")]
+ public sealed class OracleConnection : Component, ICloneable, IDbConnection
{
#region Fields
get { return oci.ServiceContext; }
}
+ [MonoTODO]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ public string DataSource {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ [Browsable (false)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public ConnectionState State {
get { return state; }
}
+ [DefaultValue ("")]
+ [RecommendedAsConfigurable (true)]
+ [RefreshProperties (RefreshProperties.All)]
+ [Editor ("Microsoft.VSDesigner.Data.Oracle.Design.OracleConnectionStringEditor, " + Consts.AssemblyMicrosoft_VSDesigner, typeof(UITypeEditor))]
public string ConnectionString {
get { return connectionString; }
set { SetConnectionString (value); }
}
+ [MonoTODO]
+ [Browsable (false)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ public string ServerVersion {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
internal OciGlue Oci {
get { return oci; }
}
GC.SuppressFinalize (this);
}
+ [MonoTODO]
+ protected override void Dispose (bool disposing)
+ {
+ base.Dispose (disposing);
+ }
+
+ [MonoTODO]
+ public void EnlistDistributedTransaction (ITransaction distributedTransaction)
+ {
+ throw new NotImplementedException ();
+ }
+
public void Open ()
{
oci.CreateConnection (conInfo);
}
#endregion // Methods
+
+ public event OracleInfoMessageEventHandler InfoMessage;
+ public event StateChangeEventHandler StateChange;
}
}
using System.ComponentModel;
using System.Data;
using System.Data.Common;
+using System.Drawing.Design;
namespace System.Data.OracleClient {
+ [DefaultEvent ("RowUpdated")]
+ [Designer ("Microsoft.VSDesigner.Data.VS.OracleDataAdapterDesigner, " + Consts.AssemblyMicrosoft_VSDesigner)]
+ [ToolboxItem ("Microsoft.VSDesigner.Data.VS.OracleDataAdapterToolboxItem, " + Consts.AssemblyMicrosoft_VSDesigner)]
public sealed class OracleDataAdapter : DbDataAdapter, IDbDataAdapter
{
#region Fields
#region Properties
+ [DefaultValue (null)]
+ [Editor ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, " + Consts.AssemblyMicrosoft_VSDesigner, typeof(UITypeEditor))]
public OracleCommand DeleteCommand {
get { return deleteCommand; }
set { deleteCommand = value; }
}
+ [DefaultValue (null)]
+ [Editor ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, " + Consts.AssemblyMicrosoft_VSDesigner, typeof(UITypeEditor))]
public OracleCommand InsertCommand {
get { return insertCommand; }
set { insertCommand = value; }
}
+ [DefaultValue (null)]
+ [Editor ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, " + Consts.AssemblyMicrosoft_VSDesigner, typeof(UITypeEditor))]
public OracleCommand SelectCommand {
get { return selectCommand; }
set { selectCommand = value; }
}
+ [DefaultValue (null)]
+ [Editor ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, " + Consts.AssemblyMicrosoft_VSDesigner, typeof(UITypeEditor))]
public OracleCommand UpdateCommand {
get { return updateCommand; }
set { updateCommand = value; }
return new OracleRowUpdatingEventArgs (dataRow, command, statementType, tableMapping);
}
- protected override void Dispose (bool disposing)
- {
- if (!disposed) {
- if (disposing) {
- // Release managed resources
- }
- // Release unmanaged resources
- disposed = true;
- }
- }
-
protected override void OnRowUpdated (RowUpdatedEventArgs value)
{
if (RowUpdated != null)
return new OracleNumber ((decimal) GetValue (i));
}
+ [MonoTODO]
+ public OracleDateTime GetOracleDateTime (int i)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public OracleMonthSpan GetOracleMonthSpan (int i)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public OracleString GetOracleString (int i)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public object GetOracleValue (int i)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public int GetOracleValues (object[] values)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public OracleTimeSpan GetOracleTimeSpan (int i)
+ {
+ throw new NotImplementedException ();
+ }
+
public int GetOrdinal (string name)
{
int i;
return x.Value;
}
- public static explicit operator OracleDateTime (DateTime x)
+ public static explicit operator OracleDateTime (string x)
{
- return new OracleDateTime (x);
+ return new OracleDateTime (DateTime.Parse (x));
}
#endregion // Operators and Type Conversions
//
using System;
+using System.Runtime.Serialization;
namespace System.Data.OracleClient {
+ [Serializable]
public sealed class OracleException : SystemException
{
#region Fields
this.message = message;
}
+ private OracleException (SerializationInfo si, StreamingContext sc) : base(si, sc)
+ {
+ message = si.GetString ("message");
+ code = si.GetInt32 ("source");
+ }
+
#endregion // Constructors
#region Properties
using System.ComponentModel;
using System.Data;
using System.Data.OracleClient.Oci;
+using System.Globalization;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient {
+ [TypeConverter (typeof(OracleParameter.OracleParameterConverter))]
public sealed class OracleParameter : MarshalByRefObject, IDbDataParameter, IDataParameter, ICloneable
{
#region Fields
set { container = value; }
}
+ [Browsable (false)]
+ [RefreshProperties (RefreshProperties.All)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public DbType DbType {
get { return dbType; }
set { SetDbType (value); }
}
+ [DefaultValue (ParameterDirection.Input)]
+ [RefreshProperties (RefreshProperties.All)]
public ParameterDirection Direction {
get { return direction; }
set { direction = value; }
}
+ [Browsable (false)]
+ [DesignOnly (true)]
+ [DefaultValue (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
public bool IsNullable {
get { return isNullable; }
set { isNullable = value; }
}
+ [DefaultValue (0)]
+ [Browsable (false)]
public int Offset {
get { return offset; }
set { offset = value; }
}
+ [DefaultValue (OracleType.VarChar)]
+ [RefreshProperties (RefreshProperties.All)]
public OracleType OracleType {
get { return oracleType; }
set { SetOracleType (value); }
}
+ [DefaultValue ("")]
public string ParameterName {
get { return name; }
set { name = value; }
}
+ [DefaultValue (0)]
public byte Precision {
get { return precision; }
set { /* NO EFFECT*/ }
}
+ [DefaultValue (0)]
public byte Scale {
get { return scale; }
set { /* NO EFFECT*/ }
}
+ [DefaultValue (0)]
public int Size {
get { return size; }
set {
}
}
+ [DefaultValue ("")]
public string SourceColumn {
get { return srcColumn; }
set { srcColumn = value; }
}
+ [DefaultValue (DataRowVersion.Current)]
public DataRowVersion SourceVersion {
get { return srcVersion; }
set { srcVersion = value; }
}
+ [DefaultValue (null)]
+ [RefreshProperties (RefreshProperties.All)]
+ [TypeConverter (typeof(StringConverter))]
public object Value {
get { return this.value; }
set { this.value = value; }
return value.ToString ().Length;
}
- public void SetDbType (DbType type)
+ private void SetDbType (DbType type)
{
string exception = String.Format ("No mapping exists from DbType {0} to a known OracleType.", type);
switch (type) {
}
- public void SetOracleType (OracleType type)
+ private void SetOracleType (OracleType type)
{
string exception = String.Format ("No mapping exists from OracleType {0} to a known DbType.", type);
switch (type) {
}
#endregion // Methods
+
+ internal sealed class OracleParameterConverter : ExpandableObjectConverter
+ {
+ public OracleParameterConverter ()
+ {
+ }
+
+ [MonoTODO]
+ public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public override object ConvertTo (ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
+ {
+ throw new NotImplementedException ();
+ }
+ }
}
}
using System.ComponentModel;
using System.Data;
using System.Data.OracleClient.Oci;
+using System.Drawing.Design;
+using System.Reflection;
namespace System.Data.OracleClient {
- public class OracleParameterCollection : MarshalByRefObject, IDataParameterCollection, IList, ICollection, IEnumerable
+ [ListBindable (false)]
+ [Editor ("Microsoft.VSDesigner.Data.Oracle.Design.DBParametersEditor, " + Consts.AssemblyMicrosoft_VSDesigner, typeof(UITypeEditor))]
+ public sealed class OracleParameterCollection : MarshalByRefObject, IDataParameterCollection, IList, ICollection, IEnumerable
{
#region Fields
{
if (!(value is OracleParameter))
throw new InvalidCastException ("The parameter was not an OracleParameter.");
- Add ((OracleParameter) value);
- return IndexOf (value);
+ Add ((OracleParameter) value);
+ return IndexOf (value);
}
public OracleParameter Add (OracleParameter value)
throw new ArgumentException ("The OracleParameter specified in the value parameter is already added to this or another OracleParameterCollection.");
value.Container = this;
list.Add (value);
- return value;
+ return value;
}
public OracleParameter Add (string parameterName, object value)
return this.value.CompareTo (((OracleString) value).Value);
}
+ [MonoTODO]
+ public static OracleBoolean GreaterThan (OracleString x, OracleString y)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static OracleBoolean GreaterThanOrEqual (OracleString x, OracleString y)
+ {
+ throw new NotImplementedException ();
+ }
+
public static OracleBoolean LessThan (OracleString x, OracleString y)
{
- return (!x.notNull || !y.notNull) ?
- OracleBoolean.Null :
- new OracleBoolean (String.Compare (x.value, y.value, false, CultureInfo.InvariantCulture) < 0);
+ return (x < y);
}
public static OracleBoolean LessThanOrEqual (OracleString x, OracleString y)
{
- return (!x.notNull || !y.notNull) ?
- OracleBoolean.Null : new OracleBoolean (String.Compare (x.value, y.value, false, CultureInfo.InvariantCulture) <= 0);
+ return (x <= y);
}
public static OracleString Concat (OracleString x, OracleString y)
{
- return (x.notNull && y.notNull) ?
- new OracleString (x.value + y.value) :
- Null;
+ return x + y;
}
public override int GetHashCode ()
public static OracleBoolean Equals (OracleString x, OracleString y)
{
- return (!x.notNull || !y.notNull) ?
- OracleBoolean.Null : new OracleBoolean (x.value == y.value);
+ return (x == y);
}
public static OracleBoolean NotEquals (OracleString x, OracleString y)
{
- return (!x.notNull || !y.notNull) ?
- OracleBoolean.Null : x.value != y.value;
+ return (x != y);
}
public override string ToString ()
}
#endregion // Methods
+
+ #region Operators
+
+ public static OracleString operator + (OracleString x, OracleString y)
+ {
+ return (x.notNull && y.notNull) ?
+ new OracleString (x.value + y.value) :
+ Null;
+ }
+
+ public static OracleBoolean operator == (OracleString x, OracleString y)
+ {
+ return (!x.notNull || !y.notNull) ?
+ OracleBoolean.Null : new OracleBoolean (x.value == y.value);
+ }
+
+ public static explicit operator string (OracleString x)
+ {
+ return x.Value;
+ }
+
+ [MonoTODO]
+ public static OracleBoolean operator > (OracleString x, OracleString y)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static OracleBoolean operator >= (OracleString x, OracleString y)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static implicit operator OracleString (string s)
+ {
+ return new OracleString (s);
+ }
+
+ public static OracleBoolean operator != (OracleString x, OracleString y)
+ {
+ return (!x.notNull || !y.notNull) ?
+ OracleBoolean.Null : x.value != y.value;
+ }
+
+ public static OracleBoolean operator < (OracleString x, OracleString y)
+ {
+ return (!x.notNull || !y.notNull) ?
+ OracleBoolean.Null :
+ new OracleBoolean (String.Compare (x.value, y.value, false, CultureInfo.InvariantCulture) < 0);
+ }
+
+ public static OracleBoolean operator <= (OracleString x, OracleString y)
+ {
+ return (!x.notNull || !y.notNull) ?
+ OracleBoolean.Null : new OracleBoolean (String.Compare (x.value, y.value, false, CultureInfo.InvariantCulture) <= 0);
+ }
+
+ #endregion // Operators
}
}