OciParameterDescriptor.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //
  2. // OciParameterDescriptor.cs
  3. //
  4. // Part of managed C#/.NET library System.Data.OracleClient.dll
  5. //
  6. // Part of the Mono class libraries at
  7. // mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci
  8. //
  9. // Assembly: System.Data.OracleClient.dll
  10. // Namespace: System.Data.OracleClient.Oci
  11. //
  12. // Author:
  13. // Tim Coleman <[email protected]>
  14. //
  15. // Copyright (C) Tim Coleman, 2003
  16. //
  17. using System;
  18. using System.Data.OracleClient;
  19. using System.Runtime.InteropServices;
  20. namespace System.Data.OracleClient.Oci {
  21. internal sealed class OciParameterDescriptor : OciDescriptorHandle
  22. {
  23. #region Fields
  24. OciErrorHandle errorHandle;
  25. OciServiceHandle service;
  26. OciDataType type;
  27. #endregion // Fields
  28. #region Constructors
  29. public OciParameterDescriptor (OciHandle parent, IntPtr handle)
  30. : base (OciHandleType.Parameter, parent, handle)
  31. {
  32. }
  33. #endregion // Constructors
  34. #region Properties
  35. public OciErrorHandle ErrorHandle {
  36. get { return errorHandle; }
  37. set { errorHandle = value; }
  38. }
  39. #endregion // Properties
  40. #region Methods
  41. public string GetName ()
  42. {
  43. return GetAttributeString (OciAttributeType.Name, ErrorHandle);
  44. }
  45. public int GetDataSize ()
  46. {
  47. return (int) GetAttributeUInt16 (OciAttributeType.DataSize, ErrorHandle);
  48. }
  49. public OciDataType GetDataType ()
  50. {
  51. return (OciDataType) GetAttributeInt32 (OciAttributeType.DataType, ErrorHandle);
  52. }
  53. public short GetPrecision ()
  54. {
  55. return (short) GetAttributeByte (OciAttributeType.Precision, ErrorHandle);
  56. }
  57. public short GetScale ()
  58. {
  59. return (short) GetAttributeSByte (OciAttributeType.Scale, ErrorHandle);
  60. }
  61. public bool GetIsNull ()
  62. {
  63. return GetAttributeBool (OciAttributeType.IsNull, ErrorHandle);
  64. }
  65. #endregion // Methods
  66. }
  67. }