On 9 October 2012 15:57, Rajeev Prasad <rp.ne...@yahoo.com> wrote:
> Hello, I guess a very basic question.
>
> In the following example: from
> http://search.cpan.org/~mstrout/DBIx-Class-0.08202/lib/DBIx/Class/ResultSet.pm
>
>
>   my @cds    = $cd_rs->search({ year => 2001 }); # "... WHERE year = 2001"
>   my $new_rs = $cd_rs->search({ year => 2005 });
>
> are we to understand that, table is 'indexed' or at least has a unique
> constraint on the column year? or can I do a search on non-index,
> non-constrained, just a normal column?
>
No, indexing is not necessary and there is no constraint on the column year.

The first example returns all rows that match year '2001' and puts the
row objects into @cds.

The second example returns a result set which represents a query for
all rows that match the year '2005'.

> thank you.
> Rajeev
>

_______________________________________________
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/dbix-class@lists.scsys.co.uk

Reply via email to