title: How to efficiently unravel arguments to a database in Python
body: <p>I have the following function which takes 4 arguments (we don't know which are set and which aren't before runtime).</p>
  
  <pre><code>myFuct(self, arg1, arg2, arg3, arg4):
      # db insert function for only those args that are set
  </code></pre>
  
  <p>Is there an <strong>efficient way</strong> of unraveling the <strong>set</strong> arguments in a mysql database with a single sql query?</p>
  
  <p>P.S. I am looking for a pythonic way to do this without having to say <em>if-this-then-that</em> for a million times... </p>
  
  <p>Thanks in advance.</p>