kysely icon indicating copy to clipboard operation
kysely copied to clipboard

Add `Date` as a valid return type for `max` and `min`

Open samclearman opened this issue 1 year ago • 2 comments

At least with postgres / pg, it's possible for the value of a field generated by the max and min functions to be a Date. This PR updates the constraints on the types of these functions to reflect that.

samclearman avatar Jun 26 '24 00:06 samclearman

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 5, 2025 10:46pm

vercel[bot] avatar Jun 26 '24 00:06 vercel[bot]

Hey 👋

Thanks! 💪

~~Let's add a unit test case that verifies a Date is returned by pg @ https://github.com/kysely-org/kysely/blob/master/test/node/src/aggregate-function.test.ts.~~ ~~Let's add type-only test cases @ https://github.com/kysely-org/kysely/blob/master/test/typings/test-d/aggregate-function.test-d.ts.~~

igalklebanov avatar Jul 14 '24 21:07 igalklebanov

Pushed this through the finish line. Thanks for raising this. 🙏

igalklebanov avatar Jan 05 '25 22:01 igalklebanov