X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSource.pm;h=824e6d679c5d87327c822d391163e370f5c2cd55;hb=89170201e8ff8c60fab401b4b2e60f0fa13a3c47;hp=075c331ae045ed7389fd958aa5fccd9bbd8806e5;hpb=a93c65f29d8a3fc58e0d19fec4195a371c999fea;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 075c331..824e6d6 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -537,6 +537,30 @@ sub _pri_cols { return @pcols; } +=head2 sequence + +Manually define the correct sequence for your table, to avoid the overhead +associated with looking up the sequence automatically. The supplied sequence +will be applied to the L of each L + +=over 4 + +=item Arguments: $sequence_name + +=item Return value: undefined + +=back + +=cut + +sub sequence { + my ($self,$seq) = @_; + foreach my $pri ($self->primary_columns) { + $self->column_info($pri)->{sequence} = $seq; + } +} + + =head2 add_unique_constraint =over 4