[Dbix-class] Does DBIx::Class support postgresql arrays and ANY
syntax?
Adam Witney
awitney at sgul.ac.uk
Wed Feb 18 11:09:03 GMT 2009
> Does DBIx::Class support PostgreSQL array columns? I would normally
> query using something like this:
>
> SELECT * FROM test1 WHERE 1 = ANY(my_array_col);
>
> I can't seem to find anything via google at this point.
following up from my own question, I have managed to get this working
like this:
my $str = ' = ANY(my_array_col)';
my $expt_rs = $schema->resultset('test1')->search( { '1' => \$str } );
which seems to be a little bit of a hack... does anyone know if there
is a better way of approaching this?
thanks
adam
More information about the DBIx-Class
mailing list