I think this is actually an SQL::Abstract bug, but the SQLA docs say to
try the dbic mailing lists for support, so..
Steps to reproduce under SQL::Abstract:
my $sql = SQL::Abstract->new;
my($stmt, @bind) = $sql->select('foo', 'foo', {
address => { '>>=' => '10.2.3.4' },
}
);
$stmt contains:
SELECT foo FROM foo WHERE ( address = >>=( ? ) )
what it *should* contain:
SELECT foo FROM foo WHERE ( address >>= ? )
Steps to reproduce under DBIx::Class:
CREATE TABLE foo(address INET);
$schema->resultset('Foo')->search(
{
address => { '>>=' => '10.1.2.3.' }
}
)->next;
Generated SQL:
SELECT me.id, me.address FROM foo me WHERE ( address = >>=( ? ) ):
'10.1.2.3'
SQL error:
DBD::Pg::st execute failed: ERROR: operator does not exist: >>=
What the SQL should have been:
SELECT me.id, me.address FROM foo me WHERE ( address >>= ? ): '10.1.2.3'
Cheers,
Toby
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]