Make your own free website on Tripod.com

File : oci-thick-parameter_pkg.ads


with 
  OCI.Thick.Statement_pkg,
  OCI.Thick.Connection_Pkg;
package OCI.Thick.Parameter_pkg is
use Statement_pkg;

   type Typecode is (TYPE_UNDEFINED,
      TYPE_REF,
      TYPE_DATE,
      TYPE_SIGNED8,
      TYPE_SIGNED16,
      TYPE_SIGNED32,
      TYPE_REAL,
      TYPE_DOUBLE,
      TYPE_FLOAT,
      TYPE_NUMBER,
      TYPE_DECIMAL,
      TYPE_UNSIGNED8,
      TYPE_UNSIGNED16,
      TYPE_UNSIGNED32,
      TYPE_OCTET,
      TYPE_SMALLINT,
      TYPE_INTEGER,
      TYPE_RAW,
      TYPE_PTR,
      TYPE_VARCHAR2,
      TYPE_CHAR,
      TYPE_VARCHAR,
      TYPE_MLSLABEL,
      TYPE_VARRAY,
      TYPE_TABLE,
      TYPE_OBJECT,
      TYPE_OPAQUE,
      TYPE_NAMEDCOLLECTION,
      TYPE_BLOB,
      TYPE_BFILE,
      TYPE_CLOB,
      TYPE_CFILE);

-- Parameter

   type Parameter is new Handle_Reference with private;
   
   type Parameters is array(Positive range<>) of Parameter;

   function Column(Stmt : Statement; Position : Positive) return Parameter;
   function Get_Parameters(Stmt : Statement) return Parameters;

   function Name(Param : Parameter) return String;
   function Type_Code(Param : Parameter) return Typecode;
   function Type_Name(Param : Parameter) return String;
   function Data_Size(Param : Parameter) return Natural;
   function PRECISION(Param : Parameter) return Integer;
   function SCALE(Param : Parameter) return Integer;
   function IS_NULL(Param : Parameter) return Boolean;
   function SCHEMA_NAME(Param : Parameter) return String;

private
   use Connection_Pkg;
   
   type Parameter is new Handle_Reference with record
     Last_Stmt : Statement;
     Connect : Connection;
   end record;
   procedure Destroy(Object : in out Parameter);

end OCI.Thick.PArameter_pkg