Up to now, there was not a simple way to add runtime validation to database queries. However, thanks to
zod, a schema validation and static type interference library, and
Slonik, we can now have the best of both worlds by writing just a single schema per query and getting static types and runtime result validation.