Hi,<br><br>In my app I have 'cachevect @@ to_tsquery(?)' in my WHERE clause and it proved to be impossible to have this, with those parents, generated by Abstract - the only way to have it is by literal.<br><br>--<br>Zbyszek
<br><br><div><span class="gmail_quote">On 7/11/06, <b class="gmail_sendername">Matt S Trout</b> <<a href="mailto:dbix-class@trout.me.uk">dbix-class@trout.me.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Jesper Krogh wrote:<br>> Hi.. I have a table with elements of the followin form<br>><br>> prefixdigit ... such as:<br>> abs123<br>> aasfdasdf91231231<br>><br>> Then I've created to immutable stored procedures in postgresql and created an
<br>> index on them:<br>><br>> The stored procedures take the prefix in lower case and the digit.<br>><br>> Thus.<br>><br>> select element,prefix(element),digit(element)<br>> gives (on Abs123).<br>
><br>> Abs123,abs,123<br>><br>> And using a select from the psql prompt makes Postgresql use the index:<br>><br>> select * from table where prefix(element) = 'abs' and digit(element) > 100;<br>><br>
> How do I create this query using DBIx::Class?<br><br>Probably using a literal SQL chunk; SQL::Abstract isn't as smart as it might<br>be about handling functions in the WHERE clause.<br><br>--<br> Matt S Trout Offering custom development, consultancy and support
<br> Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact<br>Shadowcat Systems Ltd. mst (at) <a href="http://shadowcatsystems.co.uk">shadowcatsystems.co.uk</a> for more information<br><br>+ Help us build a better perl ORM:
<a href="http://dbix-class.shadowcatsystems.co.uk/">http://dbix-class.shadowcatsystems.co.uk/</a> +<br><br>_______________________________________________<br>List: <a href="http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class">
http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class</a><br>Wiki: <a href="http://dbix-class.shadowcatsystems.co.uk/">http://dbix-class.shadowcatsystems.co.uk/</a><br>IRC: irc.perl.org#dbix-class<br>SVN: <a href="http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/">
http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/</a><br>Searchable Archive: <a href="http://www.mail-archive.com/dbix-class@lists.rawmode.org/">http://www.mail-archive.com/dbix-class@lists.rawmode.org/</a><br></blockquote>
</div><br><br clear="all"><br>-- <br>Zbigniew Lukasiak<br><a href="http://brudnopis.blogspot.com/">http://brudnopis.blogspot.com/</a>