From: nperez Date: Thu, 4 Feb 2010 14:36:26 +0000 (-0600) Subject: Some pod fixes, updating Changes, prepping for release X-Git-Tag: 2.001002~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=commitdiff_plain;h=d666a194afbf36c50785acff4e7fb4e04e534374 Some pod fixes, updating Changes, prepping for release --- diff --git a/Changes b/Changes index 9ef6816..b6bf443 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,10 @@ Revision history for Catalyst-Controller-DBIC-API: {{ $dist->version }} {{ $NEXT }} +************************************************************** +** THIS RELEASE GUARANTEES TO BREAK BACKWARDS COMPATIBILITY ** +************************************************************** + - Merge create and update into update_or_create - object is much advanced now: + Identifier can be omitted, and data_root in the request is interpreted @@ -16,10 +20,16 @@ Revision history for Catalyst-Controller-DBIC-API: {{ $dist->version }} - Extending is now explicitly done via Moose method modifiers - The only portion of the stash in use is to allow runtime definition of create/update_allows - list is now broken down into several steps: - + list_munge_parameters - + list_perform_search - + list_format_output - + row_format_output (which is just a passthrough per row) + + list_munge_parameters + + list_perform_search + + list_format_output + + row_format_output (which is just a passthrough per row) +- Search can now take an array of hashrefs to give the ability to use the default 'OR' +- By default search_parameters is an ArrayRef[HashRef] which is pertinent to list_munge_parameters +- More thorough documentation of the various bits and pieces. + + Documentation now uses Pod::Weaver and Plugin::PodWeaver (weaver.ini added) +- The distribution is now managed by Dist::Zilla +- And some more likely forgotten. 1.004002 - Implement 'as' as a complement to 'select' diff --git a/lib/Catalyst/Controller/DBIC/API.pm b/lib/Catalyst/Controller/DBIC/API.pm index b992e96..7ae2bc3 100644 --- a/lib/Catalyst/Controller/DBIC/API.pm +++ b/lib/Catalyst/Controller/DBIC/API.pm @@ -301,7 +301,7 @@ The goal of this method is to call ->search() on the current_result_set, HashRef If the L config param is defined then the hashes will contain only those columns, otherwise all columns in the object will be returned. L of course supports the function/procedure calling semantics that L. In order to have proper column names in the result, provide arguments in L (which also follows L semantics. Similarly L, L, L and L affect the maximum number of rows returned as well as the ordering and grouping. Note that if select, count, ordered_by or grouped_by request parameters are present then these will override the values set on the class with select becoming bound by the select_exposes attribute. -If not all objects in the resultset are required then it's possible to pass conditions to the method as request parameters. You can use a JSON string as the 'search' parameter for maximum flexibility or use L syntax. In the second case the request parameters are expanded into a structure and then used as the search condition. +If not all objects in the resultset are required then it's possible to pass conditions to the method as request parameters. You can use a JSON string as the 'search' parameter for maximum flexibility or use L syntax. In the second case the request parameters are expanded into a structure and then used as the search condition. For example, these request parameters: @@ -923,7 +923,7 @@ For example if you wanted create to return the JSON for the newly created object BEGIN { extends 'MyApp::ControllerBase::DBIC::API::RPC' }; ... -It should be noted that the L attribute will produce the above result for you, free of charge. +It should be noted that the return_object attribute will produce the above result for you, free of charge. For REST the only difference besides the class names would be that create should be :Private rather than an endpoint. diff --git a/lib/Catalyst/Controller/DBIC/API/RequestArguments.pm b/lib/Catalyst/Controller/DBIC/API/RequestArguments.pm index e9e2139..f85a4e2 100644 --- a/lib/Catalyst/Controller/DBIC/API/RequestArguments.pm +++ b/lib/Catalyst/Controller/DBIC/API/RequestArguments.pm @@ -237,7 +237,7 @@ Like the synopsis in DBIC::API shows, you can declare a "template" of what is al }, ); -=attribute_public search is: ro, isa: HashRef +=attribute_public search is: ro, isa: L search contains the raw search parameters. Upon setting, a trigger will fire to format them, set search_parameters, and set search_attributes. @@ -286,7 +286,7 @@ Please see L for details on how the format work }, ); -=attribute_public search_parameters is:ro, isa: L +=attribute_public search_parameters is:ro, isa: L search_parameters stores the formatted search parameters that will be passed to ->search