Returning Variant data from Java to PL/SQL & SQL?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nick Thurn

    Returning Variant data from Java to PL/SQL & SQL?

    Folks,

    I'm trying to define a oracle Java Stored Proc interface to an
    existing timeseries database. Series are accessed by name and are
    returned as vectors of type pairs, specifically (Date, number) (Date,
    date), (date, string), (number, number), (number, date) or
    (number,string) .

    I could simply create all the types and their table types

    create or replace type xxx_datnum_t as object
    ( item DATE, value NUMBER );
    /
    ...

    create or replace type xxx_datnum_tab as table of xxx_datnum_t;
    /
    ...

    then access these types from Java via the StructDescripto r and
    ArrayDescriptor apis while defining multiple typesafe call_specs to
    access the data from PLSQL and SQL.

    The problem with this solution is it requires my PL/SQL code to know
    in advance what the return type will be from a request.

    Is there any way to build and return types in Java and then return
    them to Oracle? (apart from returning everything as a string!!) I
    suspect there isn't but you never know your luck!!

    Any help on this would be greatly appreciated (including being told
    it's not possible!.

    Thanks
    Nick
Working...