It's hard to tell exactly how it's being passed bc the quotes always show up in the green preview button but that's because I'm assuming it's a string.... here are two screenshots to highlight the confusion. These work but when i change the way the single quotes are added around the JS evaluation, it errors
what's the column type set as in the database? it looks like the type is UUID? if so, I think the comparison ends up being varchar(36) and string, which will result in an error.
maybe try: SELECT _encrypted_shopfiy_access_token FROM core_store WHERE id::text = {{ inspector.selectedID }}
or WHERE id = {{ inspector.selectedID }}::uuid
an alternative would be to change the column type to 'text', but depending on your project/code this could break other things.
ahhh my bad!! I totally wouldn't have just given the answer straight up if I had noticed and would have offered some extra hints instead. I'll have to read more closely next time
and i'm failing at clicking the correct reply button. i'm all thumbs today lol
i may have put the type conversion in the wrong place WHERE id = {{ inspector.selectedID::uuid }}
this def seems like a type problem though. comparing a string to the postgresql UUID type is the only problem I can see, hopefully more qualified postgresql people will pop in here and correct me . I don't use the sql stuff often so you may need to play around with where to put ::uuid
like: WHERE id = '{{ inspector.selectedID }}'::uuid
or specifying the type for both l-value and r-value: WHERE id::uuid = {{ inspector.selectedID }}::uuid WHERE id::uuid = '{{ inspector.selectedID }}'::uuid WHERE id::uuid = {{ inspector.selectedId::uuid }} WHERE id::text = {{ inspector.selectedID }}::text WHERE id::text = '{{ inspector.selectedID }}'::text
have you tried changing the column type in the database to text?
the error message makes me think something doesn't like the dash/hypens so you might try these with inspector.selectedID.replace("-",""). i think i remember the postgresql docs saying it supports uuids both with and without the dash, but the problem might be on the javascript side where the dash is causing problems.