Clarify how to use SQL functions as part of a larger search
[dbsrgits/DBIx-Class.git] / 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 ]