Rust-oracle: calling stored procedures with UDT parameters


I wonder if it is possible to call an oracle stored procedure that has both in and out UDT (user-defined type) parameters? Here's the example I've been working on:

I have 5 structs corresponding to 5 UDTs in my oracle db:

    aso_id: String,
    forg_types: FORGTYPE,

struct FORGTYPE{
    values: Vec<i8>,

    bookables: BOOKABLETABTYPE,
    STATUS: String, 

    values: Vec<BOOKABLE>,

struct BOOKABLE{
    ifi_id: String,
    head_id: String,
    forgtet_id: String,

As you can see, there is a lot of nestling of UDTs and even nested tables. I want to call my stored procedure that takes an ASO_BOOKABLE object as IN parameter and has an OUT parameter of BOOKABLETYPE.

My hunch is that I should use something like this:

let rows = connection.query_as(
            "CALL myStoredProcedure($1, NULL)",
            &[&ASO_BOOKABLE as &(dyn ToSql)],

I'm not sure if this is the right way and I also have a bit of a difficult time writing the fromSql and toSql trait implementations for my structs. Can someone point me in the right direction please?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.