Skip to content

Expose SqlSelect so it can be used in type signatures #160

@googleson78

Description

@googleson78

I currently have two very similar sql queries, different in only their return type. (one returns a tuple and has a limit, while the other returns count(*) with no limit)

I would like to create a function

f ::
  SqlSelect a r =>
  (... -> SqlQuery a) ->
  ReaderT SqlBackend IO [r]

to factour out the similarities by passing in an f :: ... -> SqlQuery a function which determines the return type of the query. However to give a type to this I have to use SqlSelect, which is in an internal module.

Would it be possible to somehow expose it for this purpose, or should I just use the Internal module in this case? (or is there some other solution that I just missed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions