Closed domm closed 5 years ago
Thanks! Go ahead and credit ctrlo for this. Then could you squash all commits except the maint/explain one, since as far as I can tell they are all part of a single unit?
??
-- Sent from a rotary phone rented from Ma Bell
On Mon, Jul 22, 2019, 11:24 AM Thomas Klausner notifications@github.com wrote:
Closed #95 https://github.com/frioux/DBIx-Class-Helpers/pull/95.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/frioux/DBIx-Class-Helpers/pull/95?email_source=notifications&email_token=AAAB7Y6G7X3X76VZ5TNPFRTQAX3OBA5CNFSM4IFOF3E2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOSUGXTJQ#event-2500688294, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAB7YYPFR5QENUMFTLZUYLQAX3OBANCNFSM4IFOF3EQ .
Hi!
On Mon, Jul 22, 2019 at 11:27:25AM -0700, fREW Schmidt wrote:
??
While squashing the commits I removed an old branch which the pull req was based on. I guess this also closed this pull req. But I've opened another one: https://github.com/frioux/DBIx-Class-Helpers/pull/96
Sorry for the confusion..
Greetings, domm
--
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
Hi!
This pull request adds the new method
dt_SQL_subtract
toDBIx::Class::Helper::ResultSet::DateMethods1
It works exactly like
dt_SQL_add
, but subtracts dates (surprise!).While one can pass negative values to
dt_SQL_add
to subtract a literal value ($amount
), this does not work when the value is not passed as a literal value but as the name of another column where the actual value is stored. Hence this new method.Besides the code and some docs I've added test for sqlite and postgres. As I don't have access to other database engines (and could not figure out how to connect the tests to mysql running in Docker), I did not add tests for those engines.
Please note that this work was sponsored by ctrlo.com. I have not added a note to the docs yet, but maybe it would be a nice touch to honor their support for open source software.
Greetings, domm