[Catalyst-commits] r12542 - in
Catalyst-Controller-DBIC-API/1.004/trunk: .
lib/Catalyst/Controller/DBIC
abraxxa at dev.catalyst.perl.org
abraxxa at dev.catalyst.perl.org
Thu Jan 7 18:57:53 GMT 2010
Author: abraxxa
Date: 2010-01-07 18:57:53 +0000 (Thu, 07 Jan 2010)
New Revision: 12542
Modified:
Catalyst-Controller-DBIC-API/1.004/trunk/Changes
Catalyst-Controller-DBIC-API/1.004/trunk/lib/Catalyst/Controller/DBIC/API.pm
Log:
Added pod for the expanded search parameter json string syntax
Fixed pod for parameters using a json string which shouldn't be surrounded by single quotes
Modified: Catalyst-Controller-DBIC-API/1.004/trunk/Changes
===================================================================
--- Catalyst-Controller-DBIC-API/1.004/trunk/Changes 2010-01-07 18:27:34 UTC (rev 12541)
+++ Catalyst-Controller-DBIC-API/1.004/trunk/Changes 2010-01-07 18:57:53 UTC (rev 12542)
@@ -3,6 +3,8 @@
1.004002
- Implement 'as' as a complement to 'select'
- CGI::Expand'ed search parameters are now also JSON decoded + test
+- Fixed pod for parameters using a json string which shouldn't be surrounded
+ by single quotes
1.004001
- Allow for more complex prefetch_allows (multiple keys in hash)
Modified: Catalyst-Controller-DBIC-API/1.004/trunk/lib/Catalyst/Controller/DBIC/API.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.004/trunk/lib/Catalyst/Controller/DBIC/API.pm 2010-01-07 18:27:34 UTC (rev 12541)
+++ Catalyst-Controller-DBIC-API/1.004/trunk/lib/Catalyst/Controller/DBIC/API.pm 2010-01-07 18:57:53 UTC (rev 12542)
@@ -284,12 +284,16 @@
?search.name=fred&search.cd.artist=luke
OR
- ?search='{"name":"fred","cd": {"artist":"luke"}}'
+ ?search={"name":"fred","cd": {"artist":"luke"}}
Would result in this search (where 'name' is a column of the schema class, 'cd' is a relation of the schema class and 'artist' is a column of the related class):
$rs->search({ name => 'fred', 'cd.artist' => 'luke' }, { join => ['cd'] })
+Since version 1.004002 it is also possible to use a JSON string for expandeded parameters:
+
+ ?search.datetime={"-between":["2010-01-06 19:28:00","2010-01-07 19:28:00"]}
+
Note that if pagination is needed, this can be achieved using a combination of the L</list_count> and L</list_page> parameters. For example:
?page=2&count=20
More information about the Catalyst-commits
mailing list