frioux / DBIx-Class-Helpers

https://metacpan.org/pod/DBIx::Class::Helpers
20 stars 38 forks source link

add dt_SQL_subtract to DateMethods1 #96

Closed domm closed 5 years ago

domm commented 5 years ago

This commit adds the new method dt_SQL_subtract to DBIx::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.

domm commented 5 years ago

Here's the finished pull request, squished into one commit. I've also added the sponsor note and mysql tests

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.05%) to 98.729% when pulling de384685465bcbea2b10ddca5fcb0d0693001ff7 on domm:master into ba9ab1bee7e9af1f6a849bb562ad45550f47388e on frioux:master.

domm commented 5 years ago

Hey, anything left to do on my side to get this PR merged?

Greetings, domm

frioux commented 5 years ago

Sorry I'm on vacation so haven't responded. I expect to be able to get to this in maybe 5 days, ok?

-- Sent from a rotary phone rented from Ma Bell

On Mon, Jul 29, 2019, 3:48 AM Thomas Klausner notifications@github.com wrote:

Hey, anything left to do on my side to get this PR merged?

Greetings, domm

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/frioux/DBIx-Class-Helpers/pull/96?email_source=notifications&email_token=AAAB7Y4P4F3YCYW4PPQ74HTQB2ODHA5CNFSM4IF3NDK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD274HRI#issuecomment-515883973, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAB7Y2NO5UQFR5PZJ5B6NLQB2ODHANCNFSM4IF3NDKQ .

domm commented 5 years ago

no problem, I just wanted to make sure that the PR was not lost somewhere due to me deleting the old one..

Have a nice holiday!

frioux commented 5 years ago

Merged!

frioux commented 5 years ago

(and uploaded to CPAN, so should be released soon)