title: oracle execute immediate using reference to multiple variables
body: <p>I'm using Oracle Rest Data Services to build an app.</p>
  
  <p>I can easily read &amp; write with something like this <code>GET http://example.com/foo/bar</code> that runs query <code>SELECT * FROM bar</code> or</p>
  
  <p><code>POST http://example.com/foo/bar
  {
    "first": "a'b",
    "second": "c,d"
  }</code></p>
  
  <p>that runs query <code>INSERT INTO bar (first, second) VALUES (:first, :second)</code></p>
  
  <p>Where query parameters are bound from request body.</p>
  
  <p>Now, I'd like to build a route that run a dynamic query.</p>
  
  <p>I can do that with one binding param, eg.:</p>
  
  <p><code>POST http://example.com/foo/query
  {
    "query": "DELETE FROM bar WHERE first = :param",
    "param": "a'b"
  }</code></p>
  
  <p>that runs query</p>
  
  <p><code>BEGIN EXECUTE IMMEDIATE :query USING :param; END;</code></p>
  
  <p>But I don't know how to do it with multiple params. For eg. </p>
  
  <p><code>POST http://example.com/foo/query
  {
    "query": "DELETE FROM bar WHERE first = :first AND second = :second",
    "bindings": "first,second",
    "first": "a'b",
    "second": "c,d"
  }</code></p>
  
  <p>The query should be something like</p>
  
  <p><code>DECLARE
    params ...? -- (params variable should set USING list from :bindings request param) 
  BEGIN
    EXECUTE IMMEDIATE :query USING params; 
  END;</code></p>
  
  <p>Any idea?</p>