Skip to content

Ergonomics and guidance for sharing queries #90

Open
@3noch

Description

@3noch

I realize Beam is not fully released or fully documented, so take this with a grain of salt. So far I'm extremely impressed with Beam. Many rough edges are just things that need to get done, not at all design flaws with the library. The only thing that is repeatedly and painfully frustrating is my complete inability to know what the actual type of a query is so as to write it down. I have been pervasively using PartialTypeSignatures because I simply can't seem to come up with the types of queries. Even if I were to copy them verbatim from GHC's warning messages, the size of the type is daunting, and often larger than the query itself! What's more, I sometimes try to slice a piece of code out of one function and share it between two, only to find I can't make the type system happy enough to get rid of all the ambiguities.

What I'd like, at least for now, is some sort of EVERYTHING constraint (or alias) that just lets me say "This is a PG query that can do anything" and that way I can just avoid the issue when I'm in a pinch. However, also having more, say, ergonomic ways of handling the types would be ideal. It's quite possible this already exists and I'm not aware of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions