Re: SQL::Abstract 1.18

[prev] [thread] [next] [Date index for 2005/03/04]

From: Thomas L Shinnick
Subject: Re: SQL::Abstract 1.18
Date: 03:24 on 04 Mar 2005
At 20:42 3/3/2005, you wrote:
>>>>>> "Nathan" == Nathan Wiger <nate@xxx.xxx> writes:
>
>Nathan> Hey all-
>Nathan> So thought you'd like to know I just finished SQL::Abstract 1.18,
>Nathan> which contains a fix for this problem in 1.17:
>
>Nathan>     name => { '!=', 'Bob', '!=', 'Jim' }   # can't do that
>
>Sure you can.  I had to do that.  Did it this way:
>
>        name => { '!=', 'Bob', ' !=', 'Jim' }
>
>Note the space. :)

But then that falls apart on even farther out edge cases:
  DB<2> use SQL::Abstract;
  DB<3> $sql = SQL::Abstract->new();

  DB<4> x ($stmt,@bind) = $sql->where({ abc => {'!=','Bob',' !=','Jim', '  !=', 'Sam'} } );
0  ' WHERE ( abc   != ? AND abc  != ? AND abc != ? )'
1  'Sam'
2  'Jim'
3  'Bob'

  DB<11> x ($stmt,@bind) = $sql->where({ abc => {'!=',undef,' !=','Jim', '  !=', 'Sam'} } );
0  ' WHERE ( abc   != ? AND abc  != ? AND abc IS NOT NULL )'
1  'Sam'
2  'Jim'

  DB<12> x ($stmt,@bind) = $sql->where({ abc => {'  !=',undef,' !=','Jim', '!=', 'Sam'} } );
0  ' WHERE ( abc IS NULL AND abc  != ? AND abc != ? )'
1  'Jim'
2  'Sam'

While I sure do wish I'd seen this gem 3 days ago, and do appreciate it, I'd prefer the more specifically general solution proposed in 1.18  


SQL::Abstract 1.18
Nathan Wiger 00:05 on 04 Mar 2005

Re: SQL::Abstract 1.18
merlyn (Randal L. Schwartz) 02:42 on 04 Mar 2005

Re: SQL::Abstract 1.18
Thomas L Shinnick 03:24 on 04 Mar 2005

Re: SQL::Abstract 1.18
Nathan Wiger 18:53 on 04 Mar 2005

Re: SQL::Abstract 1.18
Rhesa Rozendaal 19:04 on 04 Mar 2005

Generated at 20:12 on 07 Mar 2005 by mariachi v0.52