Clarify how to use SQL functions as part of a larger search
Alexander Hartmaier [Tue, 16 Apr 2013 18:02:39 +0000 (20:02 +0200)]
lib/DBIx/Class/Manual/Cookbook.pod

index 8648b7c..588c315 100644 (file)
@@ -428,6 +428,9 @@ literal SQL:
   # Equivalent SQL:
   # SELECT * FROM employee WHERE YEAR(date_of_birth) = ?
 
+To include the function as part of a larger search, use the '-and' keyword
+to collect the search conditions:
+
   $rs->search({ -and => [
     name => 'Bob',
     \[ 'YEAR(date_of_birth) = ?', 1979 ]