<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Condition Builder 1.0 Released</title>
	<atom:link href="http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/</link>
	<description>Politics, Programming and Possibilities</description>
	<pubDate>Mon, 15 Mar 2010 00:55:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Alex</title>
		<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-27050</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 17 Jul 2008 15:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-27050</guid>
		<description>Hi Duane,

thanks for your nice plugin.
Maybe you'll find my suggestion useful:

line 69-73:
69      elsif column.to_s.downcase == "sql"
70      # Treat the first 'value' as pure SQL
71        left &#60;&#60; values.shift
72        next
73      end

adding following line:
right.concat(values)
after line 71 would allow the usage of questionmark-placeholders in pure SQL strings useful for example for case insensitive stringcompares:

c.and 'sql', "upper(columnname) = upper(?)", value</description>
		<content:encoded><![CDATA[<p>Hi Duane,</p>
<p>thanks for your nice plugin.<br />
Maybe you&#8217;ll find my suggestion useful:</p>
<p>line 69-73:<br />
69      elsif column.to_s.downcase == &#8220;sql&#8221;<br />
70      # Treat the first &#8216;value&#8217; as pure SQL<br />
71        left &lt;&lt; values.shift<br />
72        next<br />
73      end</p>
<p>adding following line:<br />
right.concat(values)<br />
after line 71 would allow the usage of questionmark-placeholders in pure SQL strings useful for example for case insensitive stringcompares:</p>
<p>c.and &#8217;sql&#8217;, &#8220;upper(columnname) = upper(?)&#8221;, value</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valery</title>
		<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-23307</link>
		<dc:creator>Valery</dc:creator>
		<pubDate>Wed, 02 Apr 2008 21:55:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-23307</guid>
		<description>Actually it could be solved by a small patch, just change

from:
case values.size
          raise "No value specified for Condition" 

to:
case values.size
      when 0
        if column.include?("IS NULL")
          left </description>
		<content:encoded><![CDATA[<p>Actually it could be solved by a small patch, just change</p>
<p>from:<br />
case values.size<br />
          raise &#8220;No value specified for Condition&#8221; </p>
<p>to:<br />
case values.size<br />
      when 0<br />
        if column.include?(&#8221;IS NULL&#8221;)<br />
          left</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valery</title>
		<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-23304</link>
		<dc:creator>Valery</dc:creator>
		<pubDate>Wed, 02 Apr 2008 21:20:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-23304</guid>
		<description>Is it posible to specify IS NULL ?</description>
		<content:encoded><![CDATA[<p>Is it posible to specify IS NULL ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre Sachs (Cape Town)</title>
		<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-10506</link>
		<dc:creator>Andre Sachs (Cape Town)</dc:creator>
		<pubDate>Mon, 11 Jun 2007 07:56:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-10506</guid>
		<description>Hi Duane,

Thanks for a neat plugin ! I would like to contribute a patch to fix a problem I have encountered regarding handling of array arguments and the IN operator.

What is the best way to get the patch to you ?

Regards,
  Andre</description>
		<content:encoded><![CDATA[<p>Hi Duane,</p>
<p>Thanks for a neat plugin ! I would like to contribute a patch to fix a problem I have encountered regarding handling of array arguments and the IN operator.</p>
<p>What is the best way to get the patch to you ?</p>
<p>Regards,<br />
  Andre</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David N. Welton: Rails Distributions &#124; Server software</title>
		<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-10162</link>
		<dc:creator>David N. Welton: Rails Distributions &#124; Server software</dc:creator>
		<pubDate>Mon, 04 Jun 2007 10:05:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-10162</guid>
		<description>[...] Condition Builder [...]</description>
		<content:encoded><![CDATA[<p>[...] Condition Builder [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duane Johnson</title>
		<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-3304</link>
		<dc:creator>Duane Johnson</dc:creator>
		<pubDate>Mon, 12 Feb 2007 14:39:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-3304</guid>
		<description>Thanks, andre!</description>
		<content:encoded><![CDATA[<p>Thanks, andre!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andre in LA</title>
		<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-3136</link>
		<dc:creator>andre in LA</dc:creator>
		<pubDate>Fri, 09 Feb 2007 22:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-3136</guid>
		<description>I looked at the plugin code and got the "in":

c.and "name", "in", %w[editor publisher]</description>
		<content:encoded><![CDATA[<p>I looked at the plugin code and got the &#8220;in&#8221;:</p>
<p>c.and &#8220;name&#8221;, &#8220;in&#8221;, %w[editor publisher]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andre in LA</title>
		<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-3131</link>
		<dc:creator>andre in LA</dc:creator>
		<pubDate>Fri, 09 Feb 2007 19:59:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-3131</guid>
		<description>Thank you, Duane.

Another question: how do I construct a query of the type

and account_type in ('editor','publisher')

Thank you in advance.

Also, I use the condition builder to add conditions only if certain parameters exist, like:

c.and "name", "like", params[:name]+"%" unless params[:name].empty?

and sometimes I end up with an empty condition block which produced an error.

I remedied this by adding 

c.and "1",1

at the beginning of the block.

Thank you for this simple and elegant tool.

-- Andre</description>
		<content:encoded><![CDATA[<p>Thank you, Duane.</p>
<p>Another question: how do I construct a query of the type</p>
<p>and account_type in (&#8217;editor&#8217;,'publisher&#8217;)</p>
<p>Thank you in advance.</p>
<p>Also, I use the condition builder to add conditions only if certain parameters exist, like:</p>
<p>c.and &#8220;name&#8221;, &#8220;like&#8221;, params[:name]+&#8221;%&#8221; unless params[:name].empty?</p>
<p>and sometimes I end up with an empty condition block which produced an error.</p>
<p>I remedied this by adding </p>
<p>c.and &#8220;1&#8243;,1</p>
<p>at the beginning of the block.</p>
<p>Thank you for this simple and elegant tool.</p>
<p>&#8211; Andre</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duane Johnson</title>
		<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-3080</link>
		<dc:creator>Duane Johnson</dc:creator>
		<pubDate>Fri, 09 Feb 2007 03:10:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-3080</guid>
		<description>andre:

c.and 'name', 'like', 'alex%'</description>
		<content:encoded><![CDATA[<p>andre:</p>
<p>c.and &#8216;name&#8217;, &#8216;like&#8217;, &#8216;alex%&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andre in LA</title>
		<link>http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-3071</link>
		<dc:creator>andre in LA</dc:creator>
		<pubDate>Thu, 08 Feb 2007 22:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/01/04/condition-builder-10-released/#comment-3071</guid>
		<description>How do you construct a quiery like this:

and name like 'alex%'

Thank you.</description>
		<content:encoded><![CDATA[<p>How do you construct a quiery like this:</p>
<p>and name like &#8216;alex%&#8217;</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
