X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FDBIC%2FAPI%2FStaticArguments.pm;h=280e92a9dce321f21b169d5db695cc6443c23e4b;hp=862dc2148958e78f6f6134de935c25d50e360ae6;hb=810de6afa72cd92df2a6749ef85af7cce31302e7;hpb=d273984026646e5b57c052deef3fcb9121122060 diff --git a/lib/Catalyst/Controller/DBIC/API/StaticArguments.pm b/lib/Catalyst/Controller/DBIC/API/StaticArguments.pm index 862dc21..280e92a 100644 --- a/lib/Catalyst/Controller/DBIC/API/StaticArguments.pm +++ b/lib/Catalyst/Controller/DBIC/API/StaticArguments.pm @@ -31,7 +31,7 @@ foreach my $var (qw/create_requires create_allows update_requires update_allows/ traits => ['Array'], default => sub { [] }, trigger => sub - { + { my ($self, $new) = @_; $self->check_column_relation($_, 1) for @$new; }, @@ -66,6 +66,14 @@ page_arg controls how to reference 'page' in the the request_data has 'page_arg' => ( is => 'ro', isa => Str, default => 'list_page' ); +=attribute_public offset_arg is: ro, isa: Str, default: 'offset' + +offset_arg controls how to reference 'offset' in the the request_data + +=cut + +has 'offset_arg' => ( is => 'ro', isa => Str, default => 'list_offset' ); + =attribute_public select_arg is: ro, isa: Str, default: 'list_returns' select_arg controls how to reference 'select' in the the request_data @@ -114,7 +122,15 @@ prefetch_arg controls how to reference 'prefetch' in the the request_data has 'prefetch_arg' => ( is => 'ro', isa => Str, default => 'list_prefetch' ); -=attribute_public data_root is: ro, isa: Str, default: 'listt' +=attribute_public stash_key is: ro, isa: Str, default: 'response' + +stash_key controls where in stash request_data should be stored + +=cut + +has 'stash_key' => ( is => 'ro', isa => Str, default => 'response'); + +=attribute_public data_root is: ro, isa: Str, default: 'list' data_root controls how to reference where the data is in the the request_data @@ -122,6 +138,15 @@ data_root controls how to reference where the data is in the the request_data has 'data_root' => ( is => 'ro', isa => Str, default => 'list'); +=attribute_public item_root is: ro, isa: Str, default: 'data' + +item_root controls how to reference where the data for single object +requests is in the the request_data + +=cut + +has 'item_root' => ( is => 'ro', isa => Str, default => 'data'); + =attribute_public total_entries_arg is: ro, isa: Str, default: 'totalcount' total_entries_arg controls how to reference 'total_entries' in the the request_data