[Dbix-class] Retrieveing substring?
Zbigniew Lukasiak
zzbbyy at gmail.com
Wed Feb 27 21:15:37 GMT 2008
On Tue, Feb 26, 2008 at 1:40 PM, Alex Povolotsky <tarkhil at over.ru> wrote:
> Hello!
>
> I have a very simple record
>
> create table location (
> lid serial primary key,
> name varchar(128) not null,
> descr text);
>
> I'd like to retrevie for list
>
> select lid, name, substr(descr,100) as descrbegin from location;
>
> How should I do it with DBIx::Class? I do not want to fetch
> (potentially) very long description every time.
>
Have a look at:
http://search.cpan.org/~jrobinson/DBIx-Class-0.08009/lib/DBIx/Class/Manual/Cookbook.pod#Using_database_functions_or_stored_procedures
I hope that helps.
Z.
More information about the DBIx-Class
mailing list