Skip to content
Discussion options

You must be logged in to vote

So I tried it locally on a psql command line with a test table and the provided data.

The following query works for me:

select * from study where tags @> '{"00080022": {
        "vr": "DA",
        "Value": [
            "20010327"
        ]
    }}'

This is also what is constructed by your DSL (beside the join/limit/offset);

I do not know which data are in your table or what other constraints exists so I can only guess why the query is returning no results for you. The most likely reason is that the INNER JOIN filters out all results for whatever reason.

You can and should check if the query looks correct via diesel::debug_query(). That should also allow you to inspect which part of the q…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@feliwir
Comment options

@weiznich
Comment options

@feliwir
Comment options

Answer selected by feliwir
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