kysely
kysely copied to clipboard
Add `Date` as a valid return type for `max` and `min`
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.
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 |
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.~~
Pushed this through the finish line. Thanks for raising this. 🙏