We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Understanding TypeSpec Annotations for Ecto Query Functions
146
clicks
Source: reddit.com
The author posted a question on how to correctly create a TypeSpec annotation for functions that are designed to consume and return Ecto queries. They mentioned being aware of the `Ecto.Query.t` type but were unclear on the exact syntax for a complete TypeSpec. They provided an example function, `add_filter`, which takes a query and a keyword list, applies a `where` clause, and presumably returns an updated query.
Related posts
© HashMerge 2024