Every so often I want to defenestrate Jifty::DBI for the simple fact that I cannot describe a basic WHERE clause with it. For example, the query:<br><br>SELECT *<br>FROM tasks<br>WHERE parent = 12 AND task_type = &#39;action&#39; AND (status = &#39;open&#39; OR (status = &#39;done&#39; AND completed_on &gt;= &#39;2008-06-26 11:39:22&#39;))<br>
<br>Is there a way to do this? I haven&#39;t found a combination of limits and subclauses that will let me do this that works. The code within limit() is pretty complicated, so I haven&#39;t been able to unravel what it is doing, let alone how this is supposed to work. I&#39;ll write up a complex query example in the documentation if someone will give me a demonstration on how this is supposed to be done. I have not found a good example of a complex query either.<br>
<br>My other issue with limit is that the format used in limit() is pretty verbose. Has there been any consideration for allowing arbitrary SQL to be used. I.e., this is arguably more straitforward:<br><br>$tasks-&gt;limit(sql =&gt; &quot;completed_on &gt;= &#39;2008-06-26 11:39:22&#39;&quot;);<br>
<br>than:<br><br>$tasks-&gt;limit(column =&gt; &#39;completed_on&#39;, operator =&gt; &#39;&gt;=&#39;, value =&gt; &#39;2008-06-26 11:39:22&#39;);<br><br>Or the use of a more flexible and compact format for limits, such as is used by SQL::Abstract:<br>
<br>$tasks-&gt;limit(abstract =&gt; [ completed_on =&gt; [ &#39;&gt;=&#39;, &#39;2008-06-26 11:39:22&#39; ] ]);<br><br>Cheers,<br>Sterling<br>