Thanks for describing the detail. Now I understand your motivation better.
In that case, the execute_statement API can be used. Please take a look and let me know if it suits your need.