Skip to content

Using compound fields in an IN clause #397

@chris-martin

Description

@chris-martin

Does esqueleto offer a way to use compound fields in an IN clause? e.g.

SELECT * FROM table_name WHERE (a, b) IN (...);

One would want to write

where_ $ (entity ^. EntityA, entity ^. EntityB) `in_` valList ___

But of course this is not correct, as the left-hand side has type (SqlExpr (Value a), SqlExpr (Value b)) whereas we need SqlExpr (Value (a, b)). It seems to me naively that such a function ought to be possible to define and add amongst the "normal stuff" utilities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions