Skip to content

How do I check whether a row is contained in a ListTable? #176

Answered by ocharles
marcosh asked this question in Q&A
Discussion options

You must be logged in to vote

Your best option is probably going to be using catListTable to convert a ListTable to a Query of all of its rows, and then using exists to test if the given row is in the list. This won't quite be the type you want, as this will pull you into the Query monad. I'd also warn that this is likely to have quite poor performance (I doubt PostgreSQL will be able to use an index, for example), but I may be wrong!

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ocharles
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #171 on May 19, 2022 06:51.