I'd also like to do the same thing with OCCI (for LOB data), but I haven't tried it yet. I am fairly new to OCCI, and I wonder if it would just work as hoped for. Did you try it?
I can't find any reference to RETURNING clause in the OCCI doc, but the OCI doc has this:
An OCI application implements the placeholders in the RETURNING clause as pure OUT bind variables. However, all binds in the RETURNING clause are initially IN and must be properly initialized. To provide a valid value, you can provide a NULL indicator and set that indicator to -1.
I would hope the OCCI works in the same way.
It works for me. Someone posted code for it on this thread: BLOB vs BFILE
I successfully tested an integer column, and also returning the rowid from INSERT. Note that the registerOutParam call is needed - without that I was just getting an empty string back for rowid.
I tested with 11.2 client against 10.2 server.