How you use the SQL :: Abstract clause will result in this when the clause:
WHERE username = ? AND date >= 'DATE_SUB(CURDATE(),INTERVAL 14 DAY)'
If you want to use the database functions in the where clause, you need to use a scalar link , for example:
date => { '>=' => \'DATE_SUB(CURDATE(),INTERVAL 14 DAY)' },
ProTip : if you set the DBIC_TRACE environment DBIC_TRACE to 1, DBIx :: Class will print the queries that it generates in STDERR ... so you can check if this really does what you want.
source share